home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / cisco / tacacsd.shar < prev    next >
SHell self-extracting ARchive  |  1992-08-07  |  100.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: SHell self-extracting ARchive (archive/shar).

You can browse this item here: tacacsd.shar

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file POSIX shell script text executable default
99% file a /bin/sh script, ASCII text executable default (weak)
75% TrID shar SHell self-extracting aRchive default
16% TrID Xilinx User Constraints File default (weak)
8% TrID Session Description Protocol (with rem) default (weak)
100% perlTextCheck Likely Text (Perl) default
100% gt2 Shell Skript: '/bin/sh' default (weak)
100% detectItEasy Format: plain text[LF] default (weak)
100% binwalkID Executable script, shebang: "/bin/sh" default (weak)
100% xdgMime application/x-shellscript default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 23 21 20 2f 62 69 6e 2f | 73 68 0a 23 20 54 68 69 |#! /bin/|sh.# Thi|
|00000010| 73 20 69 73 20 61 20 73 | 68 65 6c 6c 20 61 72 63 |s is a s|hell arc|
|00000020| 68 69 76 65 2e 20 20 52 | 65 6d 6f 76 65 20 61 6e |hive. R|emove an|
|00000030| 79 74 68 69 6e 67 20 62 | 65 66 6f 72 65 20 74 68 |ything b|efore th|
|00000040| 69 73 20 6c 69 6e 65 2c | 20 74 68 65 6e 20 75 6e |is line,| then un|
|00000050| 70 61 63 6b 0a 23 20 69 | 74 20 62 79 20 73 61 76 |pack.# i|t by sav|
|00000060| 69 6e 67 20 69 74 20 69 | 6e 74 6f 20 61 20 66 69 |ing it i|nto a fi|
|00000070| 6c 65 20 61 6e 64 20 74 | 79 70 69 6e 67 20 22 73 |le and t|yping "s|
|00000080| 68 20 66 69 6c 65 22 2e | 20 20 54 6f 20 6f 76 65 |h file".| To ove|
|00000090| 72 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 0a |rwrite e|xisting.|
|000000a0| 23 20 66 69 6c 65 73 2c | 20 74 79 70 65 20 22 73 |# files,| type "s|
|000000b0| 68 20 66 69 6c 65 20 2d | 63 22 2e 20 20 59 6f 75 |h file -|c". You|
|000000c0| 20 63 61 6e 20 61 6c 73 | 6f 20 66 65 65 64 20 74 | can als|o feed t|
|000000d0| 68 69 73 20 61 73 20 73 | 74 61 6e 64 61 72 64 20 |his as s|tandard |
|000000e0| 69 6e 70 75 74 20 76 69 | 61 0a 23 20 75 6e 73 68 |input vi|a.# unsh|
|000000f0| 61 72 2c 20 6f 72 20 62 | 79 20 74 79 70 69 6e 67 |ar, or b|y typing|
|00000100| 20 22 73 68 20 3c 66 69 | 6c 65 22 2c 20 65 2e 67 | "sh <fi|le", e.g|
|00000110| 2e 2e 20 20 49 66 20 74 | 68 69 73 20 61 72 63 68 |.. If t|his arch|
|00000120| 69 76 65 20 69 73 20 63 | 6f 6d 70 6c 65 74 65 2c |ive is c|omplete,|
|00000130| 20 79 6f 75 0a 23 20 77 | 69 6c 6c 20 73 65 65 20 | you.# w|ill see |
|00000140| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 6d 65 |the foll|owing me|
|00000150| 73 73 61 67 65 20 61 74 | 20 74 68 65 20 65 6e 64 |ssage at| the end|
|00000160| 3a 0a 23 09 09 22 45 6e | 64 20 6f 66 20 73 68 65 |:.#.."En|d of she|
|00000170| 6c 6c 20 61 72 63 68 69 | 76 65 2e 22 0a 23 20 43 |ll archi|ve.".# C|
|00000180| 6f 6e 74 65 6e 74 73 3a | 20 20 78 74 61 63 61 63 |ontents:| xtacac|
|00000190| 73 64 20 78 74 61 63 61 | 63 73 64 2f 4d 61 6b 65 |sd xtaca|csd/Make|
|000001a0| 66 69 6c 65 20 78 74 61 | 63 61 63 73 64 2f 63 68 |file xta|cacsd/ch|
|000001b0| 61 6e 67 65 74 61 63 2e | 63 0a 23 20 20 20 78 74 |angetac.|c.# xt|
|000001c0| 61 63 61 63 73 64 2f 69 | 6e 63 6c 75 64 65 20 78 |acacsd/i|nclude x|
|000001d0| 74 61 63 61 63 73 64 2f | 69 6e 65 74 5f 6e 74 6f |tacacsd/|inet_nto|
|000001e0| 61 2e 63 20 78 74 61 63 | 61 63 73 64 2f 73 74 72 |a.c xtac|acsd/str|
|000001f0| 65 72 72 6f 72 2e 63 0a | 23 20 20 20 78 74 61 63 |error.c.|# xtac|
|00000200| 61 63 73 64 2f 73 79 73 | 6c 6f 67 2e 33 20 78 74 |acsd/sys|log.3 xt|
|00000210| 61 63 61 63 73 64 2f 73 | 79 73 6c 6f 67 2e 63 20 |acacsd/s|yslog.c |
|00000220| 78 74 61 63 61 63 73 64 | 2f 74 61 63 61 63 73 2e |xtacacsd|/tacacs.|
|00000230| 64 6f 63 0a 23 20 20 20 | 78 74 61 63 61 63 73 64 |doc.# |xtacacsd|
|00000240| 2f 74 61 63 61 63 73 2e | 68 20 78 74 61 63 61 63 |/tacacs.|h xtacac|
|00000250| 73 64 2f 74 61 63 61 63 | 73 64 2e 38 20 78 74 61 |sd/tacac|sd.8 xta|
|00000260| 63 61 63 73 64 2f 74 61 | 63 70 61 73 73 77 64 2e |cacsd/ta|cpasswd.|
|00000270| 63 0a 23 20 20 20 78 74 | 61 63 61 63 73 64 2f 78 |c.# xt|acacsd/x|
|00000280| 74 61 63 61 63 73 64 2e | 63 20 78 74 61 63 61 63 |tacacsd.|c xtacac|
|00000290| 73 64 2f 69 6e 63 6c 75 | 64 65 2f 70 61 74 68 73 |sd/inclu|de/paths|
|000002a0| 2e 68 20 78 74 61 63 61 | 63 73 64 2f 69 6e 63 6c |.h xtaca|csd/incl|
|000002b0| 75 64 65 2f 73 79 73 0a | 23 20 20 20 78 74 61 63 |ude/sys.|# xtac|
|000002c0| 61 63 73 64 2f 69 6e 63 | 6c 75 64 65 2f 73 79 73 |acsd/inc|lude/sys|
|000002d0| 2f 73 79 73 6c 6f 67 2e | 68 0a 23 20 57 72 61 70 |/syslog.|h.# Wrap|
|000002e0| 70 65 64 20 62 79 20 73 | 63 68 61 65 66 65 72 40 |ped by s|chaefer@|
|000002f0| 64 69 72 74 20 6f 6e 20 | 4d 6f 6e 20 41 75 67 20 |dirt on |Mon Aug |
|00000300| 32 36 20 32 33 3a 31 30 | 3a 31 31 20 31 39 39 31 |26 23:10|:11 1991|
|00000310| 0a 50 41 54 48 3d 2f 62 | 69 6e 3a 2f 75 73 72 2f |.PATH=/b|in:/usr/|
|00000320| 62 69 6e 3a 2f 75 73 72 | 2f 75 63 62 20 3b 20 65 |bin:/usr|/ucb ; e|
|00000330| 78 70 6f 72 74 20 50 41 | 54 48 0a 69 66 20 74 65 |xport PA|TH.if te|
|00000340| 73 74 20 21 20 2d 64 20 | 27 78 74 61 63 61 63 73 |st ! -d |'xtacacs|
|00000350| 64 27 20 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |d' ; the|n. ec|
|00000360| 68 6f 20 73 68 61 72 3a | 20 43 72 65 61 74 69 6e |ho shar:| Creatin|
|00000370| 67 20 64 69 72 65 63 74 | 6f 72 79 20 5c 22 27 78 |g direct|ory \"'x|
|00000380| 74 61 63 61 63 73 64 27 | 5c 22 0a 20 20 20 20 6d |tacacsd'|\". m|
|00000390| 6b 64 69 72 20 27 78 74 | 61 63 61 63 73 64 27 0a |kdir 'xt|acacsd'.|
|000003a0| 66 69 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 78 |fi.if te|st -f 'x|
|000003b0| 74 61 63 61 63 73 64 2f | 4d 61 6b 65 66 69 6c 65 |tacacsd/|Makefile|
|000003c0| 27 20 2d 61 20 22 24 7b | 31 7d 22 20 21 3d 20 22 |' -a "${|1}" != "|
|000003d0| 2d 63 22 20 3b 20 74 68 | 65 6e 20 0a 20 20 65 63 |-c" ; th|en . ec|
|000003e0| 68 6f 20 73 68 61 72 3a | 20 57 69 6c 6c 20 6e 6f |ho shar:| Will no|
|000003f0| 74 20 63 6c 6f 62 62 65 | 72 20 65 78 69 73 74 69 |t clobbe|r existi|
|00000400| 6e 67 20 66 69 6c 65 20 | 5c 22 27 78 74 61 63 61 |ng file |\"'xtaca|
|00000410| 63 73 64 2f 4d 61 6b 65 | 66 69 6c 65 27 5c 22 0a |csd/Make|file'\".|
|00000420| 65 6c 73 65 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |else.ech|o shar: |
|00000430| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 78 74 |Extracti|ng \"'xt|
|00000440| 61 63 61 63 73 64 2f 4d | 61 6b 65 66 69 6c 65 27 |acacsd/M|akefile'|
|00000450| 5c 22 20 5c 28 37 36 33 | 20 63 68 61 72 61 63 74 |\" \(763| charact|
|00000460| 65 72 73 5c 29 0a 73 65 | 64 20 22 73 2f 5e 58 2f |ers\).se|d "s/^X/|
|00000470| 2f 22 20 3e 27 78 74 61 | 63 61 63 73 64 2f 4d 61 |/" >'xta|cacsd/Ma|
|00000480| 6b 65 66 69 6c 65 27 20 | 3c 3c 27 45 4e 44 5f 4f |kefile' |<<'END_O|
|00000490| 46 5f 46 49 4c 45 27 0a | 58 23 20 61 64 64 20 2d |F_FILE'.|X# add -|
|000004a0| 44 53 59 53 56 20 61 73 | 20 61 70 70 72 6f 70 72 |DSYSV as| appropr|
|000004b0| 69 61 74 65 2c 20 2d 44 | 50 57 5f 51 55 4f 54 41 |iate, -D|PW_QUOTA|
|000004c0| 20 69 66 20 79 6f 75 72 | 20 70 61 73 73 77 64 20 | if your| passwd |
|000004d0| 73 74 72 75 63 74 20 68 | 61 73 20 6f 6e 65 0a 58 |struct h|as one.X|
|000004e0| 43 46 4c 41 47 53 3d 2d | 67 20 2d 44 44 45 42 55 |CFLAGS=-|g -DDEBU|
|000004f0| 47 20 2d 44 42 53 44 34 | 33 0a 58 0a 58 23 20 6d |G -DBSD4|3.X.X# m|
|00000500| 61 79 20 6e 65 65 64 20 | 74 6f 20 2d 6c 42 53 44 |ay need |to -lBSD|
|00000510| 2c 20 2d 6c 62 73 64 2c | 20 6f 72 20 73 6f 6d 65 |, -lbsd,| or some|
|00000520| 20 73 75 63 68 0a 58 4c | 49 42 53 3d 2d 6c 72 65 | such.XL|IBS=-lre|
|00000530| 73 6f 6c 76 20 2d 6c 6d | 0a 58 0a 58 23 20 69 6e |solv -lm|.X.X# in|
|00000540| 63 6c 75 64 65 20 74 68 | 65 73 65 20 69 66 20 6e |clude th|ese if n|
|00000550| 65 63 65 73 73 61 72 79 | 0a 58 23 58 4f 42 4a 53 |ecessary|.X#XOBJS|
|00000560| 3d 73 79 73 6c 6f 67 2e | 6f 20 73 74 72 65 72 72 |=syslog.|o strerr|
|00000570| 6f 72 2e 6f 0a 58 0a 58 | 61 6c 6c 3a 09 78 74 61 |or.o.X.X|all:.xta|
|00000580| 63 61 63 73 64 20 74 61 | 63 70 61 73 73 77 64 20 |cacsd ta|cpasswd |
|00000590| 63 68 61 6e 67 65 74 61 | 63 0a 58 0a 58 78 74 61 |changeta|c.X.Xxta|
|000005a0| 63 61 63 73 64 3a 20 78 | 74 61 63 61 63 73 64 2e |cacsd: x|tacacsd.|
|000005b0| 63 20 69 6e 65 74 5f 6e | 74 6f 61 2e 6f 20 24 28 |c inet_n|toa.o $(|
|000005c0| 53 59 53 4c 4f 47 29 0a | 58 09 24 7b 43 43 7d 20 |SYSLOG).|X.${CC} |
|000005d0| 2d 49 69 6e 63 6c 75 64 | 65 20 24 7b 43 46 4c 41 |-Iinclud|e ${CFLA|
|000005e0| 47 53 7d 20 2d 6f 20 24 | 40 20 78 74 61 63 61 63 |GS} -o $|@ xtacac|
|000005f0| 73 64 2e 63 20 69 6e 65 | 74 5f 6e 74 6f 61 2e 6f |sd.c ine|t_ntoa.o|
|00000600| 20 5c 0a 58 09 09 24 28 | 53 59 53 4c 4f 47 29 20 | \.X..$(|SYSLOG) |
|00000610| 24 7b 4c 49 42 53 7d 0a | 58 0a 58 69 6e 65 74 5f |${LIBS}.|X.Xinet_|
|00000620| 6e 74 6f 61 2e 6f 3a 20 | 69 6e 65 74 5f 6e 74 6f |ntoa.o: |inet_nto|
|00000630| 61 2e 63 0a 58 09 24 7b | 43 43 7d 20 2d 49 69 6e |a.c.X.${|CC} -Iin|
|00000640| 63 6c 75 64 65 20 24 7b | 43 46 4c 41 47 53 7d 20 |clude ${|CFLAGS} |
|00000650| 2d 63 20 2d 6f 20 24 40 | 20 69 6e 65 74 5f 6e 74 |-c -o $@| inet_nt|
|00000660| 6f 61 2e 63 0a 58 0a 58 | 73 79 73 6c 6f 67 2e 6f |oa.c.X.X|syslog.o|
|00000670| 3a 20 73 79 73 6c 6f 67 | 2e 63 0a 58 09 24 7b 43 |: syslog|.c.X.${C|
|00000680| 43 7d 20 2d 49 69 6e 63 | 6c 75 64 65 20 24 7b 43 |C} -Iinc|lude ${C|
|00000690| 46 4c 41 47 53 7d 20 2d | 63 20 2d 6f 20 24 40 20 |FLAGS} -|c -o $@ |
|000006a0| 73 79 73 6c 6f 67 2e 63 | 0a 58 0a 58 73 74 72 65 |syslog.c|.X.Xstre|
|000006b0| 72 72 6f 72 2e 6f 3a 20 | 73 74 72 65 72 72 6f 72 |rror.o: |strerror|
|000006c0| 2e 63 0a 58 09 24 7b 43 | 43 7d 20 24 7b 43 46 4c |.c.X.${C|C} ${CFL|
|000006d0| 41 47 53 7d 20 2d 63 20 | 2d 6f 20 24 40 20 73 74 |AGS} -c |-o $@ st|
|000006e0| 72 65 72 72 6f 72 2e 63 | 0a 58 0a 58 74 61 63 70 |rerror.c|.X.Xtacp|
|000006f0| 61 73 73 77 64 3a 20 74 | 61 63 70 61 73 73 77 64 |asswd: t|acpasswd|
|00000700| 2e 63 0a 58 09 24 7b 43 | 43 7d 20 24 7b 43 46 4c |.c.X.${C|C} ${CFL|
|00000710| 41 47 53 7d 20 2d 6f 20 | 24 40 20 74 61 63 70 61 |AGS} -o |$@ tacpa|
|00000720| 73 73 77 64 2e 63 20 24 | 7b 4c 49 42 53 7d 0a 58 |sswd.c $|{LIBS}.X|
|00000730| 0a 58 63 68 61 6e 67 65 | 74 61 63 3a 20 63 68 61 |.Xchange|tac: cha|
|00000740| 6e 67 65 74 61 63 2e 63 | 0a 58 09 24 7b 43 43 7d |ngetac.c|.X.${CC}|
|00000750| 20 24 7b 43 46 4c 41 47 | 53 7d 20 2d 6f 20 24 40 | ${CFLAG|S} -o $@|
|00000760| 20 63 68 61 6e 67 65 74 | 61 63 2e 63 20 24 7b 4c | changet|ac.c ${L|
|00000770| 49 42 53 7d 0a 58 0a 58 | 63 6c 65 61 6e 3a 0a 58 |IBS}.X.X|clean:.X|
|00000780| 09 72 6d 20 2d 66 20 78 | 74 61 63 61 63 73 64 20 |.rm -f x|tacacsd |
|00000790| 74 61 63 70 61 73 73 77 | 64 20 63 68 61 6e 67 65 |tacpassw|d change|
|000007a0| 74 61 63 20 61 2e 6f 75 | 74 20 63 6f 72 65 20 2a |tac a.ou|t core *|
|000007b0| 2e 6f 0a 45 4e 44 5f 4f | 46 5f 46 49 4c 45 0a 69 |.o.END_O|F_FILE.i|
|000007c0| 66 20 74 65 73 74 20 37 | 36 33 20 2d 6e 65 20 60 |f test 7|63 -ne `|
|000007d0| 77 63 20 2d 63 20 3c 27 | 78 74 61 63 61 63 73 64 |wc -c <'|xtacacsd|
|000007e0| 2f 4d 61 6b 65 66 69 6c | 65 27 60 3b 20 74 68 65 |/Makefil|e'`; the|
|000007f0| 6e 0a 20 20 20 20 65 63 | 68 6f 20 73 68 61 72 3a |n. ec|ho shar:|
|00000800| 20 5c 22 27 78 74 61 63 | 61 63 73 64 2f 4d 61 6b | \"'xtac|acsd/Mak|
|00000810| 65 66 69 6c 65 27 5c 22 | 20 75 6e 70 61 63 6b 65 |efile'\"| unpacke|
|00000820| 64 20 77 69 74 68 20 77 | 72 6f 6e 67 20 73 69 7a |d with w|rong siz|
|00000830| 65 21 0a 66 69 0a 23 20 | 65 6e 64 20 6f 66 20 27 |e!.fi.# |end of '|
|00000840| 78 74 61 63 61 63 73 64 | 2f 4d 61 6b 65 66 69 6c |xtacacsd|/Makefil|
|00000850| 65 27 0a 66 69 0a 69 66 | 20 74 65 73 74 20 2d 66 |e'.fi.if| test -f|
|00000860| 20 27 78 74 61 63 61 63 | 73 64 2f 63 68 61 6e 67 | 'xtacac|sd/chang|
|00000870| 65 74 61 63 2e 63 27 20 | 2d 61 20 22 24 7b 31 7d |etac.c' |-a "${1}|
|00000880| 22 20 21 3d 20 22 2d 63 | 22 20 3b 20 74 68 65 6e |" != "-c|" ; then|
|00000890| 20 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 57 | . echo| shar: W|
|000008a0| 69 6c 6c 20 6e 6f 74 20 | 63 6c 6f 62 62 65 72 20 |ill not |clobber |
|000008b0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 5c 22 |existing| file \"|
|000008c0| 27 78 74 61 63 61 63 73 | 64 2f 63 68 61 6e 67 65 |'xtacacs|d/change|
|000008d0| 74 61 63 2e 63 27 5c 22 | 0a 65 6c 73 65 0a 65 63 |tac.c'\"|.else.ec|
|000008e0| 68 6f 20 73 68 61 72 3a | 20 45 78 74 72 61 63 74 |ho shar:| Extract|
|000008f0| 69 6e 67 20 5c 22 27 78 | 74 61 63 61 63 73 64 2f |ing \"'x|tacacsd/|
|00000900| 63 68 61 6e 67 65 74 61 | 63 2e 63 27 5c 22 20 5c |changeta|c.c'\" \|
|00000910| 28 31 37 35 31 39 20 63 | 68 61 72 61 63 74 65 72 |(17519 c|haracter|
|00000920| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|00000930| 20 3e 27 78 74 61 63 61 | 63 73 64 2f 63 68 61 6e | >'xtaca|csd/chan|
|00000940| 67 65 74 61 63 2e 63 27 | 20 3c 3c 27 45 4e 44 5f |getac.c'| <<'END_|
|00000950| 4f 46 5f 46 49 4c 45 27 | 0a 58 2f 2a 0a 58 20 2a |OF_FILE'|.X/*.X *|
|00000960| 20 63 68 61 6e 67 65 74 | 61 63 0a 58 20 2a 0a 58 | changet|ac.X *.X|
|00000970| 20 2a 20 54 68 69 73 20 | 70 72 6f 67 72 61 6d 20 | * This |program |
|00000980| 6d 61 69 6e 74 61 69 6e | 73 20 74 68 65 20 2f 65 |maintain|s the /e|
|00000990| 74 63 2f 74 61 63 70 61 | 73 73 77 64 20 66 69 6c |tc/tacpa|sswd fil|
|000009a0| 65 2e 20 20 49 74 20 61 | 6c 6c 6f 77 73 20 75 73 |e. It a|llows us|
|000009b0| 65 72 73 20 74 6f 0a 58 | 20 2a 20 63 68 61 6e 67 |ers to.X| * chang|
|000009c0| 65 20 74 68 65 69 72 20 | 6f 77 6e 20 54 41 43 41 |e their |own TACA|
|000009d0| 43 53 20 65 6e 74 72 69 | 65 73 2e 0a 58 20 2a 0a |CS entri|es..X *.|
|000009e0| 58 20 2a 20 54 68 65 20 | 70 61 73 73 77 6f 72 64 |X * The |password|
|000009f0| 20 67 65 6e 65 72 61 74 | 6f 72 20 72 6f 75 74 69 | generat|or routi|
|00000a00| 6e 65 73 20 61 72 65 20 | 66 72 6f 6d 20 42 72 61 |nes are |from Bra|
|00000a10| 6e 64 6f 6e 20 41 6c 6c | 62 65 72 79 2c 20 61 73 |ndon All|bery, as|
|00000a20| 0a 58 20 2a 20 64 69 73 | 74 72 69 62 75 72 65 64 |.X * dis|tribured|
|00000a30| 20 69 6e 20 20 63 6f 6d | 70 2e 73 6f 75 72 63 65 | in com|p.source|
|00000a40| 73 2e 6d 69 73 63 2c 20 | 76 6f 6c 75 6d 65 20 35 |s.misc, |volume 5|
|00000a50| 2c 20 70 77 67 65 6e 2e | 0a 58 20 2a 0a 58 20 2a |, pwgen.|.X *.X *|
|00000a60| 20 57 72 69 74 74 65 6e | 20 62 79 3a 20 44 61 76 | Written| by: Dav|
|00000a70| 69 64 20 48 61 6d 70 74 | 6f 6e 2c 20 32 30 20 46 |id Hampt|on, 20 F|
|00000a80| 65 62 72 75 61 72 79 20 | 31 39 39 30 2e 0a 58 20 |ebruary |1990..X |
|00000a90| 2a 20 46 72 6f 6d 20 74 | 68 65 20 74 61 63 70 61 |* From t|he tacpa|
|00000aa0| 73 77 64 20 70 72 6f 67 | 72 61 6d 20 77 72 69 74 |swd prog|ram writ|
|00000ab0| 74 65 6e 20 62 79 3a 20 | 44 61 76 69 64 20 48 61 |ten by: |David Ha|
|00000ac0| 6d 70 74 6f 6e 2c 20 33 | 30 20 4a 75 6e 65 20 38 |mpton, 3|0 June 8|
|00000ad0| 39 2e 0a 58 20 2a 2f 0a | 58 0a 58 23 69 66 64 65 |9..X */.|X.X#ifde|
|00000ae0| 66 20 53 59 53 56 0a 58 | 23 64 65 66 69 6e 65 20 |f SYSV.X|#define |
|00000af0| 72 61 6e 64 6f 6d 20 72 | 61 6e 64 0a 58 23 64 65 |random r|and.X#de|
|00000b00| 66 69 6e 65 20 73 72 61 | 6e 64 6f 6d 20 73 72 61 |fine sra|ndom sra|
|00000b10| 6e 64 0a 58 23 65 6e 64 | 69 66 0a 58 0a 58 2f 2a |nd.X#end|if.X.X/*|
|00000b20| 0a 58 50 61 74 68 3a 20 | 78 61 6e 74 68 21 6d 63 |.XPath: |xanth!mc|
|00000b30| 6e 63 21 67 61 74 65 63 | 68 21 63 77 6a 63 63 21 |nc!gatec|h!cwjcc!|
|00000b40| 68 61 6c 21 6e 63 6f 61 | 73 74 21 61 6c 6c 62 65 |hal!ncoa|st!allbe|
|00000b50| 72 79 0a 58 46 72 6f 6d | 3a 20 61 6c 6c 62 65 72 |ry.XFrom|: allber|
|00000b60| 79 40 6e 63 6f 61 73 74 | 2e 55 55 43 50 20 28 42 |y@ncoast|.UUCP (B|
|00000b70| 72 61 6e 64 6f 6e 20 53 | 2e 20 41 6c 6c 62 65 72 |randon S|. Allber|
|00000b80| 79 29 0a 58 4e 65 77 73 | 67 72 6f 75 70 73 3a 20 |y).XNews|groups: |
|00000b90| 63 6f 6d 70 2e 73 6f 75 | 72 63 65 73 2e 6d 69 73 |comp.sou|rces.mis|
|00000ba0| 63 0a 58 53 75 62 6a 65 | 63 74 3a 20 76 30 35 69 |c.XSubje|ct: v05i|
|00000bb0| 30 35 39 3a 20 70 77 67 | 65 6e 20 2d 2d 20 72 61 |059: pwg|en -- ra|
|00000bc0| 6e 64 6f 6d 2d 62 75 74 | 2d 70 72 6f 6e 6f 75 6e |ndom-but|-pronoun|
|00000bd0| 63 65 61 62 6c 65 20 70 | 61 73 73 77 6f 72 64 20 |ceable p|assword |
|00000be0| 67 65 6e 65 72 61 74 6f | 72 0a 58 4d 65 73 73 61 |generato|r.XMessa|
|00000bf0| 67 65 2d 49 44 3a 20 3c | 31 33 31 38 34 40 6e 63 |ge-ID: <|13184@nc|
|00000c00| 6f 61 73 74 2e 55 55 43 | 50 3e 0a 58 44 61 74 65 |oast.UUC|P>.XDate|
|00000c10| 3a 20 32 36 20 4e 6f 76 | 20 38 38 20 30 34 3a 34 |: 26 Nov| 88 04:4|
|00000c20| 34 3a 31 38 20 47 4d 54 | 0a 58 53 65 6e 64 65 72 |4:18 GMT|.XSender|
|00000c30| 3a 20 61 6c 6c 62 65 72 | 79 40 6e 63 6f 61 73 74 |: allber|y@ncoast|
|00000c40| 2e 55 55 43 50 0a 58 52 | 65 70 6c 79 2d 54 6f 3a |.UUCP.XR|eply-To:|
|00000c50| 20 61 6c 6c 62 65 72 79 | 40 6e 63 6f 61 73 74 2e | allbery|@ncoast.|
|00000c60| 55 55 43 50 20 28 42 72 | 61 6e 64 6f 6e 20 53 2e |UUCP (Br|andon S.|
|00000c70| 20 41 6c 6c 62 65 72 79 | 29 0a 58 4f 72 67 61 6e | Allbery|).XOrgan|
|00000c80| 69 7a 61 74 69 6f 6e 3a | 20 43 6c 65 76 65 6c 61 |ization:| Clevela|
|00000c90| 6e 64 20 50 75 62 6c 69 | 63 20 41 63 63 65 73 73 |nd Publi|c Access|
|00000ca0| 20 55 4e 2a 58 2c 20 43 | 6c 65 76 65 6c 61 6e 64 | UN*X, C|leveland|
|00000cb0| 2c 20 4f 68 0a 58 4c 69 | 6e 65 73 3a 20 33 32 38 |, Oh.XLi|nes: 328|
|00000cc0| 0a 58 41 70 70 72 6f 76 | 65 64 3a 20 61 6c 6c 62 |.XApprov|ed: allb|
|00000cd0| 65 72 79 40 6e 63 6f 61 | 73 74 2e 55 55 43 50 0a |ery@ncoa|st.UUCP.|
|00000ce0| 58 0a 58 50 6f 73 74 69 | 6e 67 2d 6e 75 6d 62 65 |X.XPosti|ng-numbe|
|00000cf0| 72 3a 20 56 6f 6c 75 6d | 65 20 35 2c 20 49 73 73 |r: Volum|e 5, Iss|
|00000d00| 75 65 20 35 39 0a 58 53 | 75 62 6d 69 74 74 65 64 |ue 59.XS|ubmitted|
|00000d10| 2d 62 79 3a 20 22 42 72 | 61 6e 64 6f 6e 20 53 2e |-by: "Br|andon S.|
|00000d20| 20 41 6c 6c 62 65 72 79 | 22 20 3c 61 6c 6c 62 65 | Allbery|" <allbe|
|00000d30| 72 79 40 6e 63 6f 61 73 | 74 2e 55 55 43 50 3e 0a |ry@ncoas|t.UUCP>.|
|00000d40| 58 41 72 63 68 69 76 65 | 2d 6e 61 6d 65 3a 20 70 |XArchive|-name: p|
|00000d50| 77 67 65 6e 0a 58 0a 58 | 5b 44 72 2e 20 4a 65 6b |wgen.X.X|[Dr. Jek|
|00000d60| 79 6c 6c 20 61 6e 64 20 | 4d 72 2e 20 48 79 64 65 |yll and |Mr. Hyde|
|00000d70| 2c 20 61 6e 79 6f 6e 65 | 3f 20 20 3b 2d 29 20 20 |, anyone|? ;-) |
|00000d80| 2b 2b 62 73 61 5d 0a 58 | 0a 58 49 27 76 65 20 64 |++bsa].X|.XI've d|
|00000d90| 65 73 63 72 69 62 65 64 | 20 74 68 69 73 20 70 72 |escribed| this pr|
|00000da0| 6f 67 72 61 6d 2c 20 69 | 6e 20 69 74 73 20 4f 53 |ogram, i|n its OS|
|00000db0| 49 20 53 75 70 65 72 62 | 6f 61 72 64 2d 49 49 20 |I Superb|oard-II |
|00000dc0| 69 6e 63 61 72 6e 61 74 | 69 6f 6e 2c 20 69 6e 0a |incarnat|ion, in.|
|00000dd0| 58 63 6f 6d 70 2e 75 6e | 69 78 2e 77 69 7a 61 72 |Xcomp.un|ix.wizar|
|00000de0| 64 73 20 61 6e 64 20 6e | 65 77 73 2e 73 79 73 61 |ds and n|ews.sysa|
|00000df0| 64 6d 69 6e 2e 20 20 4e | 6f 77 2c 20 68 65 72 65 |dmin. N|ow, here|
|00000e00| 27 73 20 74 68 65 20 63 | 6f 64 65 20 66 6f 72 20 |'s the c|ode for |
|00000e10| 61 20 55 4e 2a 58 0a 58 | 76 65 72 73 69 6f 6e 2e |a UN*X.X|version.|
|00000e20| 20 20 49 74 20 73 65 65 | 6d 73 20 74 6f 20 77 6f | It see|ms to wo|
|00000e30| 72 6b 20 4f 4b 20 6f 6e | 20 6e 63 6f 61 73 74 2c |rk OK on| ncoast,|
|00000e40| 20 65 78 63 65 70 74 20 | 66 6f 72 20 73 6f 6d 65 | except |for some|
|00000e50| 20 6f 64 64 6e 65 73 73 | 20 69 6e 20 74 68 65 0a | oddness| in the.|
|00000e60| 58 22 72 61 6e 64 6f 6d | 22 20 73 65 6c 65 63 74 |X"random|" select|
|00000e70| 69 6f 6e 73 20 2d 2d 20 | 77 68 69 63 68 20 61 72 |ions -- |which ar|
|00000e80| 65 20 70 72 6f 62 61 62 | 6c 79 20 74 68 65 20 72 |e probab|ly the r|
|00000e90| 65 73 75 6c 74 20 6f 66 | 20 6f 75 72 20 6e 6f 74 |esult of| our not|
|00000ea0| 20 68 61 76 69 6e 67 20 | 61 0a 58 67 6f 6f 64 20 | having |a.Xgood |
|00000eb0| 52 4e 47 2e 20 20 28 43 | 6f 75 6c 64 20 73 6f 6d |RNG. (C|ould som|
|00000ec0| 65 6f 6e 65 20 6d 61 69 | 6c 20 6d 65 20 6f 6e 65 |eone mai|l me one|
|00000ed0| 20 6f 72 20 6d 6f 72 65 | 20 6f 66 20 74 68 65 20 | or more| of the |
|00000ee0| 61 6c 74 65 72 6e 61 74 | 69 76 65 0a 58 67 65 6e |alternat|ive.Xgen|
|00000ef0| 65 72 61 74 6f 72 73 3f | 20 20 4f 72 20 6d 61 79 |erators?| Or may|
|00000f00| 62 65 20 65 76 65 6e 20 | 74 68 65 20 73 6f 75 72 |be even |the sour|
|00000f10| 63 65 20 74 6f 20 42 53 | 44 20 72 61 6e 64 6f 6d |ce to BS|D random|
|00000f20| 28 29 2c 20 61 73 73 75 | 6d 69 6e 67 20 74 68 61 |(), assu|ming tha|
|00000f30| 74 20 69 74 0a 58 66 61 | 6c 6c 73 20 6f 75 74 73 |t it.Xfa|lls outs|
|00000f40| 69 64 65 20 74 68 65 20 | 73 75 62 73 65 74 20 6f |ide the |subset o|
|00000f50| 66 20 42 53 44 20 63 6f | 64 65 20 74 68 61 74 20 |f BSD co|de that |
|00000f60| 63 61 6e 20 62 65 20 74 | 72 61 63 65 64 20 74 6f |can be t|raced to|
|00000f70| 20 41 54 26 54 3f 20 20 | 54 6f 20 70 75 74 20 69 | AT&T? |To put i|
|00000f80| 74 0a 58 6d 69 6c 64 6c | 79 2c 20 6f 75 72 20 72 |t.Xmildl|y, our r|
|00000f90| 61 6e 64 6f 6d 20 6e 75 | 6d 62 65 72 20 67 65 6e |andom nu|mber gen|
|00000fa0| 65 72 61 74 6f 72 20 69 | 73 6e 27 74 2e 29 0a 58 |erator i|sn't.).X|
|00000fb0| 0a 58 54 68 69 73 20 69 | 73 20 6e 6f 74 20 61 73 |.XThis i|s not as|
|00000fc0| 20 63 6f 6d 70 6c 65 74 | 65 20 61 73 20 74 68 65 | complet|e as the|
|00000fd0| 20 6f 72 69 67 69 6e 61 | 6c 20 70 72 6f 67 72 61 | origina|l progra|
|00000fe0| 6d 2c 20 77 68 69 63 68 | 20 61 63 74 75 61 6c 6c |m, which| actuall|
|00000ff0| 79 20 68 61 64 20 61 20 | 6c 69 73 74 0a 58 6f 66 |y had a |list.Xof|
|00001000| 20 63 68 61 72 61 63 74 | 65 72 73 20 28 74 68 65 | charact|ers (the|
|00001010| 20 63 75 72 72 65 6e 74 | 20 6f 6e 65 20 75 73 65 | current| one use|
|00001020| 73 20 70 68 6f 6e 65 6d | 65 73 29 20 77 68 69 63 |s phonem|es) whic|
|00001030| 68 20 77 65 72 65 20 6d | 6f 73 74 20 6c 69 6b 65 |h were m|ost like|
|00001040| 6c 79 20 74 6f 0a 58 66 | 6f 6c 6c 6f 77 20 6f 74 |ly to.Xf|ollow ot|
|00001050| 68 65 72 20 70 68 6f 6e | 65 6d 65 73 2e 20 20 4f |her phon|emes. O|
|00001060| 6e 20 74 68 65 20 6f 74 | 68 65 72 20 68 61 6e 64 |n the ot|her hand|
|00001070| 2c 20 74 68 69 73 20 76 | 65 72 73 69 6f 6e 20 64 |, this v|ersion d|
|00001080| 6f 65 73 20 75 73 65 20 | 70 68 6f 6e 65 6d 65 73 |oes use |phonemes|
|00001090| 0a 58 72 61 74 68 65 72 | 20 74 68 61 6e 20 63 68 |.Xrather| than ch|
|000010a0| 61 72 61 63 74 65 72 73 | 2c 20 73 6f 20 69 74 73 |aracters|, so its|
|000010b0| 20 63 72 65 61 74 69 6f | 6e 73 20 61 72 65 20 6d | creatio|ns are m|
|000010c0| 6f 72 65 20 70 72 6f 6e | 6f 75 6e 63 65 61 62 6c |ore pron|ounceabl|
|000010d0| 65 20 61 73 20 61 20 72 | 75 6c 65 0a 58 74 68 61 |e as a r|ule.Xtha|
|000010e0| 6e 20 74 68 6f 73 65 20 | 6f 66 20 74 68 65 20 6f |n those |of the o|
|000010f0| 72 69 67 69 6e 61 6c 2e | 20 20 54 68 65 20 72 65 |riginal.| The re|
|00001100| 73 75 6c 74 69 6e 67 20 | 70 61 73 73 77 6f 72 64 |sulting |password|
|00001110| 73 20 61 72 65 6e 27 74 | 20 71 75 69 74 65 20 61 |s aren't| quite a|
|00001120| 73 0a 58 22 6e 61 74 75 | 72 61 6c 22 20 61 73 20 |s.X"natu|ral" as |
|00001130| 74 68 65 20 6f 72 69 67 | 69 6e 61 6c 2c 20 68 6f |the orig|inal, ho|
|00001140| 77 65 76 65 72 2e 20 20 | 28 54 68 61 74 20 6d 61 |wever. |(That ma|
|00001150| 79 20 62 65 20 66 6f 72 | 20 74 68 65 20 62 65 73 |y be for| the bes|
|00001160| 74 3b 20 74 68 65 20 6f | 72 69 67 69 6e 61 6c 0a |t; the o|riginal.|
|00001170| 58 77 61 73 20 69 6e 74 | 65 6e 64 65 64 20 61 73 |Xwas int|ended as|
|00001180| 20 61 20 73 69 6d 70 6c | 65 20 65 78 70 65 72 69 | a simpl|e experi|
|00001190| 6d 65 6e 74 20 74 6f 20 | 73 65 65 20 69 66 20 61 |ment to |see if a|
|000011a0| 20 72 75 6c 65 20 66 6f | 72 20 22 70 72 6f 70 65 | rule fo|r "prope|
|000011b0| 72 20 45 6e 67 6c 69 73 | 68 0a 58 77 6f 72 64 73 |r Englis|h.Xwords|
|000011c0| 22 20 63 6f 75 6c 64 20 | 62 65 20 64 65 66 69 6e |" could |be defin|
|000011d0| 65 64 20 69 6e 20 74 65 | 72 6d 73 20 6f 66 20 72 |ed in te|rms of r|
|000011e0| 75 6c 65 73 20 77 68 69 | 63 68 20 72 65 6c 61 74 |ules whi|ch relat|
|000011f0| 65 64 20 6c 65 74 74 65 | 72 73 2e 20 20 54 68 69 |ed lette|rs. Thi|
|00001200| 73 20 77 61 73 0a 58 62 | 65 66 6f 72 65 20 49 20 |s was.Xb|efore I |
|00001210| 67 6f 74 20 74 6f 20 63 | 6f 6c 6c 65 67 65 20 61 |got to c|ollege a|
|00001220| 6e 64 20 6c 65 61 72 6e | 65 64 20 74 68 61 74 20 |nd learn|ed that |
|00001230| 73 75 63 68 20 74 68 69 | 6e 67 73 20 77 65 72 65 |such thi|ngs were|
|00001240| 20 72 61 74 68 65 72 20 | 75 6e 6c 69 6b 65 6c 79 | rather |unlikely|
|00001250| 2c 0a 58 62 75 74 20 74 | 68 65 20 6f 72 69 67 69 |,.Xbut t|he origi|
|00001260| 6e 61 6c 20 70 72 6f 67 | 72 61 6d 20 73 74 69 6c |nal prog|ram stil|
|00001270| 6c 20 64 69 64 20 61 20 | 70 72 65 74 74 79 20 67 |l did a |pretty g|
|00001280| 6f 6f 64 20 6a 6f 62 20 | 6f 66 20 73 70 65 77 69 |ood job |of spewi|
|00001290| 6e 67 20 6f 75 74 20 73 | 6f 6d 65 0a 58 63 6f 6d |ng out s|ome.Xcom|
|000012a0| 6d 6f 6e 20 45 6e 67 6c | 69 73 68 20 77 6f 72 64 |mon Engl|ish word|
|000012b0| 73 2e 20 20 54 68 61 74 | 20 63 61 6e 27 74 20 62 |s. That| can't b|
|000012c0| 65 20 73 61 69 64 20 66 | 6f 72 20 2a 74 68 69 73 |e said f|or *this|
|000012d0| 2a 20 70 72 6f 67 72 61 | 6d 2e 29 0a 58 0a 58 54 |* progra|m.).X.XT|
|000012e0| 6f 20 63 6f 6d 70 69 6c | 65 3a 09 63 63 20 2d 4f |o compil|e:.cc -O|
|000012f0| 20 2d 6f 20 70 77 67 65 | 6e 20 70 77 67 65 6e 2e | -o pwge|n pwgen.|
|00001300| 63 20 2d 6c 6d 0a 58 28 | 54 68 65 20 73 71 72 74 |c -lm.X(|The sqrt|
|00001310| 28 29 20 66 75 6e 63 74 | 69 6f 6e 20 69 73 20 75 |() funct|ion is u|
|00001320| 73 65 64 20 69 6e 20 61 | 6e 20 61 74 74 65 6d 70 |sed in a|n attemp|
|00001330| 74 20 74 6f 20 70 72 6f | 64 75 63 65 20 61 20 72 |t to pro|duce a r|
|00001340| 61 6e 64 6f 6d 20 6e 75 | 6d 62 65 72 20 77 68 69 |andom nu|mber whi|
|00001350| 63 68 0a 58 69 73 20 22 | 77 65 69 67 68 74 65 64 |ch.Xis "|weighted|
|00001360| 22 20 74 6f 77 61 72 64 | 20 6f 6e 65 20 65 6e 64 |" toward| one end|
|00001370| 20 6f 66 20 74 68 65 20 | 72 61 6e 67 65 2c 20 73 | of the |range, s|
|00001380| 6f 20 61 73 20 74 6f 20 | 70 72 65 66 65 72 20 6f |o as to |prefer o|
|00001390| 6e 65 20 65 6e 64 20 6f | 66 20 61 20 6c 69 73 74 |ne end o|f a list|
|000013a0| 0a 58 6f 66 20 22 73 70 | 65 6c 6c 69 6e 67 73 22 |.Xof "sp|ellings"|
|000013b0| 20 66 6f 72 20 61 20 70 | 68 6f 6e 65 6d 65 20 6f | for a p|honeme o|
|000013c0| 76 65 72 20 74 68 65 20 | 6f 74 68 65 72 20 65 6e |ver the |other en|
|000013d0| 64 2e 20 20 49 74 20 73 | 65 65 6d 73 20 74 6f 20 |d. It s|eems to |
|000013e0| 77 6f 72 6b 2c 20 62 75 | 74 20 77 69 74 68 0a 58 |work, bu|t with.X|
|000013f0| 74 68 69 73 20 72 6f 74 | 74 65 64 20 52 4e 47 2c |this rot|ted RNG,|
|00001400| 20 49 20 63 61 6e 27 74 | 20 62 65 20 61 62 73 6f | I can't| be abso|
|00001410| 6c 75 74 65 6c 79 20 63 | 65 72 74 61 69 6e 2e 20 |lutely c|ertain. |
|00001420| 20 41 20 74 72 69 61 6c | 20 64 69 73 74 72 69 62 | A trial| distrib|
|00001430| 75 74 69 6f 6e 20 73 65 | 65 6d 73 0a 58 74 6f 20 |ution se|ems.Xto |
|00001440| 62 65 20 63 6f 72 72 65 | 63 74 2c 20 68 6f 77 65 |be corre|ct, howe|
|00001450| 76 65 72 2e 29 0a 58 0a | 58 57 68 61 74 27 73 20 |ver.).X.|XWhat's |
|00001460| 74 68 65 20 69 6e 74 65 | 6e 74 3f 20 20 49 20 66 |the inte|nt? I f|
|00001470| 69 6e 64 20 74 68 61 74 | 20 49 20 63 61 6e 20 72 |ind that| I can r|
|00001480| 65 6d 65 6d 62 65 72 20 | 61 20 22 77 6f 72 64 22 |emember |a "word"|
|00001490| 20 62 65 74 74 65 72 20 | 69 66 20 49 20 63 61 6e | better |if I can|
|000014a0| 0a 58 70 72 6f 6e 6f 75 | 6e 63 65 20 69 74 2e 20 |.Xpronou|nce it. |
|000014b0| 20 54 68 69 73 20 6d 61 | 79 20 6f 72 20 6d 61 79 | This ma|y or may|
|000014c0| 20 6e 6f 74 20 62 65 20 | 74 72 75 65 20 66 6f 72 | not be |true for|
|000014d0| 20 6f 74 68 65 72 20 70 | 65 6f 70 6c 65 2c 20 62 | other p|eople, b|
|000014e0| 75 74 20 2a 61 6e 79 74 | 68 69 6e 67 2a 0a 58 74 |ut *anyt|hing*.Xt|
|000014f0| 68 61 74 20 65 6e 63 6f | 75 72 61 67 65 73 20 74 |hat enco|urages t|
|00001500| 68 65 20 75 73 65 20 6f | 66 20 72 61 6e 64 6f 6d |he use o|f random|
|00001510| 20 70 61 73 73 77 6f 72 | 64 73 20 69 73 20 61 6e | passwor|ds is an|
|00001520| 20 69 6d 70 72 6f 76 65 | 6d 65 6e 74 20 6f 6e 20 | improve|ment on |
|00001530| 77 68 61 74 20 49 0a 58 | 74 79 70 69 63 61 6c 6c |what I.X|typicall|
|00001540| 79 20 73 65 65 20 61 74 | 20 63 6c 69 65 6e 74 20 |y see at| client |
|00001550| 73 69 74 65 73 20 65 76 | 65 72 79 20 64 61 79 2e |sites ev|ery day.|
|00001560| 20 20 53 6f 20 74 68 69 | 73 20 70 72 6f 67 72 61 | So thi|s progra|
|00001570| 6d 20 73 70 69 74 73 20 | 6f 75 74 0a 58 70 61 73 |m spits |out.Xpas|
|00001580| 73 77 6f 72 64 73 20 77 | 68 69 63 68 20 61 72 65 |swords w|hich are|
|00001590| 20 76 69 72 74 75 61 6c | 6c 79 20 67 75 61 72 61 | virtual|ly guara|
|000015a0| 6e 74 65 65 64 20 6e 6f | 74 20 74 6f 20 62 65 20 |nteed no|t to be |
|000015b0| 66 6f 75 6e 64 20 69 6e | 20 74 68 65 20 64 69 63 |found in| the dic|
|000015c0| 74 69 6f 6e 61 72 79 2c | 0a 58 62 75 74 20 61 72 |tionary,|.Xbut ar|
|000015d0| 65 20 28 75 73 75 61 6c | 6c 79 29 20 70 72 6f 6e |e (usual|ly) pron|
|000015e0| 6f 75 6e 63 65 61 62 6c | 65 20 74 6f 20 73 70 65 |ounceabl|e to spe|
|000015f0| 61 6b 65 72 73 20 6f 66 | 20 45 6e 67 6c 69 73 68 |akers of| English|
|00001600| 2e 20 20 28 54 68 65 20 | 74 61 62 6c 65 73 20 63 |. (The |tables c|
|00001610| 61 6e 20 62 65 0a 58 6d | 6f 64 69 66 69 65 64 20 |an be.Xm|odified |
|00001620| 66 6f 72 20 6f 74 68 65 | 72 20 6c 61 6e 67 75 61 |for othe|r langua|
|00001630| 67 65 73 2c 20 62 75 74 | 20 74 68 65 79 27 72 65 |ges, but| they're|
|00001640| 20 72 61 74 68 65 72 20 | 68 61 69 72 79 2e 20 20 | rather |hairy. |
|00001650| 50 65 72 68 61 70 73 20 | 49 27 6c 6c 20 77 72 69 |Perhaps |I'll wri|
|00001660| 74 65 0a 58 61 20 76 65 | 72 73 69 6f 6e 20 77 68 |te.Xa ve|rsion wh|
|00001670| 69 63 68 20 6c 6f 61 64 | 73 20 22 63 6f 6d 70 69 |ich load|s "compi|
|00001680| 6c 65 64 22 20 6c 61 6e | 67 75 61 67 65 20 64 65 |led" lan|guage de|
|00001690| 73 63 72 69 70 74 69 6f | 6e 73 2c 20 61 6e 64 20 |scriptio|ns, and |
|000016a0| 6c 65 74 20 74 68 65 20 | 63 6f 6d 70 69 6c 65 72 |let the |compiler|
|000016b0| 0a 58 64 65 61 6c 20 77 | 69 74 68 20 74 68 65 20 |.Xdeal w|ith the |
|000016c0| 68 61 69 72 79 20 73 74 | 75 66 66 2e 20 20 48 65 |hairy st|uff. He|
|000016d0| 79 2c 20 74 68 65 79 20 | 77 65 72 65 20 65 76 65 |y, they |were eve|
|000016e0| 6e 20 68 61 69 72 69 65 | 72 20 69 6e 20 74 68 65 |n hairie|r in the|
|000016f0| 20 42 41 53 49 43 0a 58 | 76 65 72 73 69 6f 6e 21 | BASIC.X|version!|
|00001700| 29 0a 58 0a 58 4f 68 2c | 20 77 65 6c 6c 2c 20 73 |).X.XOh,| well, s|
|00001710| 68 61 72 20 61 6e 64 20 | 65 6e 6a 6f 79 2e 0a 58 |har and |enjoy..X|
|00001720| 0a 58 2b 2b 42 72 61 6e | 64 6f 6e 2c 20 73 69 74 |.X++Bran|don, sit|
|00001730| 74 69 6e 67 20 6f 6e 20 | 74 68 65 20 6f 74 68 65 |ting on |the othe|
|00001740| 72 20 73 69 64 65 20 6f | 66 20 74 68 65 20 66 65 |r side o|f the fe|
|00001750| 6e 63 65 20 66 6f 72 20 | 74 68 65 20 6d 6f 6d 65 |nce for |the mome|
|00001760| 6e 74 0a 58 2a 2f 0a 58 | 0a 58 2f 2a 0a 58 20 2a |nt.X*/.X|.X/*.X *|
|00001770| 20 47 65 6e 65 72 61 74 | 65 20 28 68 6f 70 65 66 | Generat|e (hopef|
|00001780| 75 6c 6c 79 29 20 70 72 | 6f 6e 6f 75 6e 63 65 61 |ully) pr|onouncea|
|00001790| 62 6c 65 20 72 61 6e 64 | 6f 6d 20 70 61 73 73 77 |ble rand|om passw|
|000017a0| 6f 72 64 73 2e 20 20 54 | 68 65 73 65 20 63 61 6e |ords. T|hese can|
|000017b0| 20 6f 66 74 65 6e 20 62 | 65 0a 58 20 2a 20 72 65 | often b|e.X * re|
|000017c0| 6d 65 6d 62 65 72 65 64 | 20 6d 6f 72 65 20 65 61 |membered| more ea|
|000017d0| 73 69 6c 79 20 74 68 61 | 6e 20 63 6f 6d 70 6c 65 |sily tha|n comple|
|000017e0| 74 65 6c 79 20 72 61 6e | 64 6f 6d 20 70 61 73 73 |tely ran|dom pass|
|000017f0| 77 6f 72 64 73 2c 20 61 | 6e 64 20 61 72 65 20 69 |words, a|nd are i|
|00001800| 6d 6d 75 6e 65 20 74 6f | 0a 58 20 2a 20 64 69 63 |mmune to|.X * dic|
|00001810| 74 69 6f 6e 61 72 79 20 | 73 65 61 72 63 68 65 73 |tionary |searches|
|00001820| 2c 20 65 74 63 2e 0a 58 | 20 2a 0a 58 20 2a 20 54 |, etc..X| *.X * T|
|00001830| 68 65 20 6f 72 69 67 69 | 6e 61 6c 20 76 65 72 73 |he origi|nal vers|
|00001840| 69 6f 6e 20 6f 66 20 74 | 68 69 73 20 70 72 6f 67 |ion of t|his prog|
|00001850| 72 61 6d 20 77 61 73 20 | 77 72 69 74 74 65 6e 20 |ram was |written |
|00001860| 69 6e 20 42 41 53 49 43 | 20 6f 6e 20 61 6e 20 4f |in BASIC| on an O|
|00001870| 53 49 0a 58 20 2a 20 53 | 75 70 65 72 62 6f 61 72 |SI.X * S|uperboar|
|00001880| 64 20 49 49 20 53 42 43 | 2e 20 20 54 68 61 74 20 |d II SBC|. That |
|00001890| 76 65 72 73 69 6f 6e 20 | 69 73 20 6c 6f 6e 67 20 |version |is long |
|000018a0| 67 6f 6e 65 20 28 74 68 | 65 20 53 42 32 27 73 20 |gone (th|e SB2's |
|000018b0| 63 61 73 73 65 74 74 65 | 20 64 72 69 76 65 0a 58 |cassette| drive.X|
|000018c0| 20 2a 20 77 61 73 20 6e | 65 76 65 72 20 74 72 75 | * was n|ever tru|
|000018d0| 73 74 77 6f 72 74 68 79 | 2c 20 69 74 20 65 76 65 |stworthy|, it eve|
|000018e0| 6e 74 75 61 6c 6c 79 20 | 73 63 72 61 6d 62 6c 65 |ntually |scramble|
|000018f0| 64 20 74 68 65 20 74 61 | 70 65 29 2c 20 62 75 74 |d the ta|pe), but|
|00001900| 20 74 68 65 20 62 61 73 | 69 63 0a 58 20 2a 20 28 | the bas|ic.X * (|
|00001910| 70 61 72 64 6f 6e 20 74 | 68 65 20 70 75 6e 29 20 |pardon t|he pun) |
|00001920| 69 64 65 61 20 6c 69 76 | 65 73 20 6f 6e 20 68 65 |idea liv|es on he|
|00001930| 72 65 2c 20 77 69 74 68 | 20 61 20 66 65 77 20 6d |re, with| a few m|
|00001940| 6f 64 69 66 69 63 61 74 | 69 6f 6e 20 6c 69 6b 65 |odificat|ion like|
|00001950| 20 62 61 73 69 6e 67 0a | 58 20 2a 20 74 68 65 20 | basing.|X * the |
|00001960| 73 65 6c 65 63 74 69 6f | 6e 20 6f 6e 20 22 67 72 |selectio|n on "gr|
|00001970| 61 70 68 73 22 20 28 61 | 63 74 75 61 6c 6c 79 2c |aphs" (a|ctually,|
|00001980| 20 74 68 65 79 20 61 72 | 65 20 61 20 72 65 73 74 | they ar|e a rest|
|00001990| 72 69 63 74 65 64 20 73 | 65 74 20 6f 66 20 70 68 |ricted s|et of ph|
|000019a0| 6f 6e 65 6d 65 73 29 0a | 58 20 2a 20 61 6e 64 20 |onemes).|X * and |
|000019b0| 68 61 76 69 6e 67 20 72 | 61 6e 64 6f 6d 6c 79 2d |having r|andomly-|
|000019c0| 73 65 6c 65 63 74 65 64 | 20 73 70 65 6c 6c 69 6e |selected| spellin|
|000019d0| 67 73 20 66 6f 72 20 74 | 68 6f 73 65 20 67 72 61 |gs for t|hose gra|
|000019e0| 70 68 73 2e 0a 58 20 2a | 2f 0a 58 0a 58 23 69 6e |phs..X *|/.X.X#in|
|000019f0| 63 6c 75 64 65 20 3c 73 | 74 64 69 6f 2e 68 3e 0a |clude <s|tdio.h>.|
|00001a00| 58 23 69 6e 63 6c 75 64 | 65 20 3c 6d 61 74 68 2e |X#includ|e <math.|
|00001a10| 68 3e 0a 58 0a 58 23 64 | 65 66 69 6e 65 20 52 41 |h>.X.X#d|efine RA|
|00001a20| 4e 44 4f 4d 28 63 29 09 | 28 28 69 6e 74 29 20 28 |NDOM(c).|((int) (|
|00001a30| 28 28 72 61 6e 64 6f 6d | 28 63 29 20 26 20 30 78 |((random|(c) & 0x|
|00001a40| 37 66 66 66 29 20 2f 20 | 33 32 37 36 37 2e 30 29 |7fff) / |32767.0)|
|00001a50| 20 2a 20 28 63 29 29 29 | 0a 58 0a 58 63 68 61 72 | * (c)))|.X.Xchar|
|00001a60| 20 2a 73 70 65 6c 6c 69 | 6e 67 5b 5d 20 3d 20 7b | *spelli|ng[] = {|
|00001a70| 0a 58 2f 2a 61 2a 2f 09 | 22 61 22 2c 09 09 09 09 |.X/*a*/.|"a",....|
|00001a80| 28 63 68 61 72 20 2a 29 | 20 30 2c 09 2f 2a 20 32 |(char *)| 0,./* 2|
|00001a90| 2a 2f 0a 58 2f 2a 41 2a | 2f 09 22 61 22 2c 09 22 |*/.X/*A*|/."a",."|
|00001aa0| 61 65 22 2c 09 22 61 69 | 22 2c 09 09 28 63 68 61 |ae",."ai|",..(cha|
|00001ab0| 72 20 2a 29 20 30 2c 09 | 2f 2a 20 36 2a 2f 0a 58 |r *) 0,.|/* 6*/.X|
|00001ac0| 2f 2a 62 2a 2f 09 22 62 | 22 2c 09 09 09 09 28 63 |/*b*/."b|",....(c|
|00001ad0| 68 61 72 20 2a 29 20 30 | 2c 09 2f 2a 20 38 2a 2f |har *) 0|,./* 8*/|
|00001ae0| 0a 58 2f 2a 63 68 2a 2f | 09 22 63 68 22 2c 09 09 |.X/*ch*/|."ch",..|
|00001af0| 09 09 28 63 68 61 72 20 | 2a 29 20 30 2c 09 2f 2a |..(char |*) 0,./*|
|00001b00| 31 30 2a 2f 0a 58 2f 2a | 64 2a 2f 09 22 64 22 2c |10*/.X/*|d*/."d",|
|00001b10| 09 09 09 09 28 63 68 61 | 72 20 2a 29 20 30 2c 09 |....(cha|r *) 0,.|
|00001b20| 2f 2a 31 32 2a 2f 0a 58 | 2f 2a 65 2a 2f 09 22 65 |/*12*/.X|/*e*/."e|
|00001b30| 22 2c 09 09 09 09 28 63 | 68 61 72 20 2a 29 20 30 |",....(c|har *) 0|
|00001b40| 2c 09 2f 2a 31 34 2a 2f | 0a 58 2f 2a 45 2a 2f 09 |,./*14*/|.X/*E*/.|
|00001b50| 22 65 22 2c 09 22 65 65 | 22 2c 09 22 69 65 22 2c |"e",."ee|",."ie",|
|00001b60| 09 09 28 63 68 61 72 20 | 2a 29 20 30 2c 09 2f 2a |..(char |*) 0,./*|
|00001b70| 31 38 2a 2f 0a 58 2f 2a | 66 2a 2f 09 22 66 22 2c |18*/.X/*|f*/."f",|
|00001b80| 09 22 70 68 22 2c 09 22 | 67 68 22 2c 09 09 28 63 |."ph",."|gh",..(c|
|00001b90| 68 61 72 20 2a 29 20 30 | 2c 09 2f 2a 32 32 2a 2f |har *) 0|,./*22*/|
|00001ba0| 0a 58 2f 2a 67 2a 2f 09 | 22 67 22 2c 09 09 09 09 |.X/*g*/.|"g",....|
|00001bb0| 28 63 68 61 72 20 2a 29 | 20 30 2c 09 2f 2a 32 34 |(char *)| 0,./*24|
|00001bc0| 2a 2f 0a 58 2f 2a 68 2a | 2f 09 22 68 22 2c 09 09 |*/.X/*h*|/."h",..|
|00001bd0| 09 09 28 63 68 61 72 20 | 2a 29 20 30 2c 09 2f 2a |..(char |*) 0,./*|
|00001be0| 32 36 2a 2f 0a 58 2f 2a | 69 2a 2f 09 22 69 22 2c |26*/.X/*|i*/."i",|
|00001bf0| 09 22 65 22 2c 09 09 09 | 28 63 68 61 72 20 2a 29 |."e",...|(char *)|
|00001c00| 20 30 2c 09 2f 2a 32 39 | 2a 2f 0a 58 2f 2a 49 2a | 0,./*29|*/.X/*I*|
|00001c10| 2f 09 22 69 22 2c 09 22 | 61 69 22 2c 09 09 09 28 |/."i",."|ai",...(|
|00001c20| 63 68 61 72 20 2a 29 20 | 30 2c 09 2f 2a 33 32 2a |char *) |0,./*32*|
|00001c30| 2f 0a 58 2f 2a 69 27 2a | 2f 09 22 69 22 2c 09 22 |/.X/*i'*|/."i",."|
|00001c40| 65 69 22 2c 09 09 09 28 | 63 68 61 72 20 2a 29 20 |ei",...(|char *) |
|00001c50| 30 2c 09 2f 2a 33 35 2a | 2f 0a 58 2f 2a 6a 2a 2f |0,./*35*|/.X/*j*/|
|00001c60| 09 22 6a 22 2c 09 22 67 | 22 2c 09 09 09 28 63 68 |."j",."g|",...(ch|
|00001c70| 61 72 20 2a 29 20 30 2c | 09 2f 2a 33 38 2a 2f 0a |ar *) 0,|./*38*/.|
|00001c80| 58 2f 2a 6b 2a 2f 09 22 | 6b 22 2c 09 22 63 22 2c |X/*k*/."|k",."c",|
|00001c90| 09 09 09 28 63 68 61 72 | 20 2a 29 20 30 2c 09 2f |...(char| *) 0,./|
|00001ca0| 2a 34 31 2a 2f 0a 58 2f | 2a 6c 2a 2f 09 22 6c 22 |*41*/.X/|*l*/."l"|
|00001cb0| 2c 09 09 09 09 28 63 68 | 61 72 20 2a 29 20 30 2c |,....(ch|ar *) 0,|
|00001cc0| 09 2f 2a 34 33 2a 2f 0a | 58 2f 2a 6d 2a 2f 09 22 |./*43*/.|X/*m*/."|
|00001cd0| 6d 22 2c 09 09 09 09 28 | 63 68 61 72 20 2a 29 20 |m",....(|char *) |
|00001ce0| 30 2c 09 2f 2a 34 35 2a | 2f 0a 58 2f 2a 6e 2a 2f |0,./*45*|/.X/*n*/|
|00001cf0| 09 22 6e 22 2c 09 09 09 | 09 28 63 68 61 72 20 2a |."n",...|.(char *|
|00001d00| 29 20 30 2c 09 2f 2a 34 | 37 2a 2f 0a 58 2f 2a 6e |) 0,./*4|7*/.X/*n|
|00001d10| 67 2a 2f 09 22 6e 67 22 | 2c 09 09 09 09 28 63 68 |g*/."ng"|,....(ch|
|00001d20| 61 72 20 2a 29 20 30 2c | 09 2f 2a 34 39 2a 2f 0a |ar *) 0,|./*49*/.|
|00001d30| 58 2f 2a 6f 2a 2f 09 22 | 6f 22 2c 09 22 61 22 2c |X/*o*/."|o",."a",|
|00001d40| 09 22 61 68 22 2c 09 09 | 28 63 68 61 72 20 2a 29 |."ah",..|(char *)|
|00001d50| 20 30 2c 09 2f 2a 35 33 | 2a 2f 0a 58 2f 2a 4f 2a | 0,./*53|*/.X/*O*|
|00001d60| 2f 09 22 6f 22 2c 09 22 | 6f 68 22 2c 09 09 09 28 |/."o",."|oh",...(|
|00001d70| 63 68 61 72 20 2a 29 20 | 30 2c 09 2f 2a 35 36 2a |char *) |0,./*56*|
|00001d80| 2f 0a 58 2f 2a 6f 6f 2a | 2f 09 22 6f 6f 22 2c 09 |/.X/*oo*|/."oo",.|
|00001d90| 22 75 22 2c 09 09 09 28 | 63 68 61 72 20 2a 29 20 |"u",...(|char *) |
|00001da0| 30 2c 09 2f 2a 35 39 2a | 2f 0a 58 2f 2a 4f 4f 2a |0,./*59*|/.X/*OO*|
|00001db0| 2f 09 22 6f 6f 22 2c 09 | 22 77 22 2c 09 09 09 28 |/."oo",.|"w",...(|
|00001dc0| 63 68 61 72 20 2a 29 20 | 30 2c 09 2f 2a 36 32 2a |char *) |0,./*62*|
|00001dd0| 2f 0a 58 2f 2a 70 2a 2f | 09 22 70 22 2c 09 09 09 |/.X/*p*/|."p",...|
|00001de0| 09 28 63 68 61 72 20 2a | 29 20 30 2c 09 2f 2a 36 |.(char *|) 0,./*6|
|00001df0| 34 2a 2f 0a 58 2f 2a 71 | 75 2a 2f 09 22 71 75 22 |4*/.X/*q|u*/."qu"|
|00001e00| 2c 09 09 09 09 28 63 68 | 61 72 20 2a 29 20 30 2c |,....(ch|ar *) 0,|
|00001e10| 09 2f 2a 36 36 2a 2f 0a | 58 2f 2a 72 2a 2f 09 22 |./*66*/.|X/*r*/."|
|00001e20| 72 22 2c 09 09 09 09 28 | 63 68 61 72 20 2a 29 20 |r",....(|char *) |
|00001e30| 30 2c 09 2f 2a 36 38 2a | 2f 0a 58 2f 2a 73 2a 2f |0,./*68*|/.X/*s*/|
|00001e40| 09 22 73 22 2c 09 22 63 | 22 2c 09 09 09 28 63 68 |."s",."c|",...(ch|
|00001e50| 61 72 20 2a 29 20 30 2c | 09 2f 2a 37 31 2a 2f 0a |ar *) 0,|./*71*/.|
|00001e60| 58 2f 2a 73 68 2a 2f 09 | 22 73 68 22 2c 09 22 73 |X/*sh*/.|"sh",."s|
|00001e70| 22 2c 09 09 09 28 63 68 | 61 72 20 2a 29 20 30 2c |",...(ch|ar *) 0,|
|00001e80| 09 2f 2a 37 34 2a 2f 0a | 58 2f 2a 74 2a 2f 09 22 |./*74*/.|X/*t*/."|
|00001e90| 74 22 2c 09 09 09 09 28 | 63 68 61 72 20 2a 29 20 |t",....(|char *) |
|00001ea0| 30 2c 09 2f 2a 37 36 2a | 2f 0a 58 2f 2a 74 68 2a |0,./*76*|/.X/*th*|
|00001eb0| 2f 09 22 74 68 22 2c 09 | 09 09 09 28 63 68 61 72 |/."th",.|...(char|
|00001ec0| 20 2a 29 20 30 2c 09 2f | 2a 37 38 2a 2f 0a 58 2f | *) 0,./|*78*/.X/|
|00001ed0| 2a 54 48 2a 2f 09 22 74 | 68 22 2c 09 09 09 09 28 |*TH*/."t|h",....(|
|00001ee0| 63 68 61 72 20 2a 29 20 | 30 2c 09 2f 2a 38 30 2a |char *) |0,./*80*|
|00001ef0| 2f 0a 58 2f 2a 75 2a 2f | 09 22 75 22 2c 09 09 09 |/.X/*u*/|."u",...|
|00001f00| 09 28 63 68 61 72 20 2a | 29 20 30 2c 09 2f 2a 38 |.(char *|) 0,./*8|
|00001f10| 32 2a 2f 0a 58 2f 2a 55 | 2a 2f 09 22 75 22 2c 09 |2*/.X/*U|*/."u",.|
|00001f20| 22 6f 6f 22 2c 09 09 09 | 28 63 68 61 72 20 2a 29 |"oo",...|(char *)|
|00001f30| 20 30 2c 09 2f 2a 38 35 | 2a 2f 0a 58 2f 2a 76 2a | 0,./*85|*/.X/*v*|
|00001f40| 2f 09 22 76 22 2c 09 09 | 09 09 28 63 68 61 72 20 |/."v",..|..(char |
|00001f50| 2a 29 20 30 2c 09 2f 2a | 38 37 2a 2f 0a 58 2f 2a |*) 0,./*|87*/.X/*|
|00001f60| 78 2a 2f 09 22 78 22 2c | 09 09 09 09 28 63 68 61 |x*/."x",|....(cha|
|00001f70| 72 20 2a 29 20 30 2c 09 | 2f 2a 38 39 2a 2f 0a 58 |r *) 0,.|/*89*/.X|
|00001f80| 2f 2a 79 2a 2f 09 22 79 | 22 2c 09 09 09 09 28 63 |/*y*/."y|",....(c|
|00001f90| 68 61 72 20 2a 29 20 30 | 2c 09 2f 2a 39 31 2a 2f |har *) 0|,./*91*/|
|00001fa0| 0a 58 2f 2a 7a 2a 2f 09 | 22 7a 22 2c 09 22 73 22 |.X/*z*/.|"z",."s"|
|00001fb0| 2c 09 09 09 28 63 68 61 | 72 20 2a 29 20 30 2c 09 |,...(cha|r *) 0,.|
|00001fc0| 2f 2a 39 34 2a 2f 0a 58 | 7d 3b 0a 58 0a 58 73 74 |/*94*/.X|};.X.Xst|
|00001fd0| 72 75 63 74 20 67 72 61 | 70 68 20 7b 0a 58 09 63 |ruct gra|ph {.X.c|
|00001fe0| 68 61 72 20 2a 67 72 61 | 70 68 3b 0a 58 09 63 68 |har *gra|ph;.X.ch|
|00001ff0| 61 72 20 74 79 70 65 3b | 0a 58 23 64 65 66 69 6e |ar type;|.X#defin|
|00002000| 65 20 43 4f 4e 53 4f 4e | 41 4e 54 09 30 0a 58 23 |e CONSON|ANT.0.X#|
|00002010| 64 65 66 69 6e 65 20 56 | 4f 57 45 4c 5f 4c 4f 4e |define V|OWEL_LON|
|00002020| 47 09 31 0a 58 23 64 65 | 66 69 6e 65 20 56 4f 57 |G.1.X#de|fine VOW|
|00002030| 45 4c 5f 53 48 4f 52 54 | 09 32 0a 58 23 64 65 66 |EL_SHORT|.2.X#def|
|00002040| 69 6e 65 20 56 4f 57 45 | 4c 5f 4f 54 48 45 52 09 |ine VOWE|L_OTHER.|
|00002050| 33 0a 58 23 64 65 66 69 | 6e 65 20 56 4f 57 45 4c |3.X#defi|ne VOWEL|
|00002060| 5f 4d 41 53 4b 09 33 0a | 58 23 64 65 66 69 6e 65 |_MASK.3.|X#define|
|00002070| 20 69 73 63 6f 6e 73 28 | 63 29 09 28 28 28 63 29 | iscons(|c).(((c)|
|00002080| 2d 3e 74 79 70 65 20 26 | 20 56 4f 57 45 4c 5f 4d |->type &| VOWEL_M|
|00002090| 41 53 4b 29 20 3d 3d 20 | 30 29 0a 58 23 64 65 66 |ASK) == |0).X#def|
|000020a0| 69 6e 65 20 69 73 76 6f | 77 65 6c 28 63 29 09 28 |ine isvo|wel(c).(|
|000020b0| 28 28 63 29 2d 3e 74 79 | 70 65 20 26 20 56 4f 57 |((c)->ty|pe & VOW|
|000020c0| 45 4c 5f 4d 41 53 4b 29 | 20 21 3d 20 30 29 0a 58 |EL_MASK)| != 0).X|
|000020d0| 2f 2a 09 63 68 61 72 20 | 66 72 65 71 75 65 6e 63 |/*.char |frequenc|
|000020e0| 79 3b 09 09 09 2a 2f 09 | 2f 2a 20 75 6e 75 73 65 |y;...*/.|/* unuse|
|000020f0| 64 20 66 6f 72 20 6e 6f | 77 20 2a 2f 0a 58 09 63 |d for no|w */.X.c|
|00002100| 68 61 72 20 2a 2a 73 70 | 65 6c 6c 69 6e 67 73 3b |har **sp|ellings;|
|00002110| 0a 58 2f 2a 09 73 74 72 | 75 63 74 20 67 72 61 70 |.X/*.str|uct grap|
|00002120| 68 20 2a 2a 66 6f 6c 6c | 6f 77 69 6e 67 3b 09 2a |h **foll|owing;.*|
|00002130| 2f 09 2f 2a 20 6d 61 79 | 62 65 20 6c 61 74 65 72 |/./* may|be later|
|00002140| 20 2a 2f 0a 58 7d 20 67 | 72 61 70 68 5b 5d 20 3d | */.X} g|raph[] =|
|00002150| 20 7b 0a 58 09 22 61 22 | 2c 09 56 4f 57 45 4c 5f | {.X."a"|,.VOWEL_|
|00002160| 53 48 4f 52 54 2c 09 26 | 73 70 65 6c 6c 69 6e 67 |SHORT,.&|spelling|
|00002170| 5b 30 5d 2c 0a 58 09 22 | 41 22 2c 09 56 4f 57 45 |[0],.X."|A",.VOWE|
|00002180| 4c 5f 4c 4f 4e 47 2c 09 | 26 73 70 65 6c 6c 69 6e |L_LONG,.|&spellin|
|00002190| 67 5b 32 5d 2c 0a 58 09 | 22 62 22 2c 09 43 4f 4e |g[2],.X.|"b",.CON|
|000021a0| 53 4f 4e 41 4e 54 2c 09 | 26 73 70 65 6c 6c 69 6e |SONANT,.|&spellin|
|000021b0| 67 5b 36 5d 2c 0a 58 09 | 22 63 68 22 2c 09 43 4f |g[6],.X.|"ch",.CO|
|000021c0| 4e 53 4f 4e 41 4e 54 2c | 09 26 73 70 65 6c 6c 69 |NSONANT,|.&spelli|
|000021d0| 6e 67 5b 38 5d 2c 0a 58 | 09 22 64 22 2c 09 43 4f |ng[8],.X|."d",.CO|
|000021e0| 4e 53 4f 4e 41 4e 54 2c | 09 26 73 70 65 6c 6c 69 |NSONANT,|.&spelli|
|000021f0| 6e 67 5b 31 30 5d 2c 0a | 58 09 22 65 22 2c 09 56 |ng[10],.|X."e",.V|
|00002200| 4f 57 45 4c 5f 53 48 4f | 52 54 2c 09 26 73 70 65 |OWEL_SHO|RT,.&spe|
|00002210| 6c 6c 69 6e 67 5b 31 32 | 5d 2c 0a 58 09 22 45 22 |lling[12|],.X."E"|
|00002220| 2c 09 56 4f 57 45 4c 5f | 4c 4f 4e 47 2c 09 26 73 |,.VOWEL_|LONG,.&s|
|00002230| 70 65 6c 6c 69 6e 67 5b | 31 34 5d 2c 0a 58 09 22 |pelling[|14],.X."|
|00002240| 66 22 2c 09 43 4f 4e 53 | 4f 4e 41 4e 54 2c 09 26 |f",.CONS|ONANT,.&|
|00002250| 73 70 65 6c 6c 69 6e 67 | 5b 31 38 5d 2c 0a 58 09 |spelling|[18],.X.|
|00002260| 22 67 22 2c 09 43 4f 4e | 53 4f 4e 41 4e 54 2c 09 |"g",.CON|SONANT,.|
|00002270| 26 73 70 65 6c 6c 69 6e | 67 5b 32 32 5d 2c 0a 58 |&spellin|g[22],.X|
|00002280| 09 22 68 22 2c 09 43 4f | 4e 53 4f 4e 41 4e 54 2c |."h",.CO|NSONANT,|
|00002290| 09 26 73 70 65 6c 6c 69 | 6e 67 5b 32 34 5d 2c 0a |.&spelli|ng[24],.|
|000022a0| 58 09 22 69 22 2c 09 56 | 4f 57 45 4c 5f 53 48 4f |X."i",.V|OWEL_SHO|
|000022b0| 52 54 2c 09 26 73 70 65 | 6c 6c 69 6e 67 5b 32 36 |RT,.&spe|lling[26|
|000022c0| 5d 2c 0a 58 09 22 49 22 | 2c 09 56 4f 57 45 4c 5f |],.X."I"|,.VOWEL_|
|000022d0| 4c 4f 4e 47 2c 09 26 73 | 70 65 6c 6c 69 6e 67 5b |LONG,.&s|pelling[|
|000022e0| 32 39 5d 2c 0a 58 09 22 | 69 27 22 2c 09 56 4f 57 |29],.X."|i'",.VOW|
|000022f0| 45 4c 5f 4f 54 48 45 52 | 2c 09 26 73 70 65 6c 6c |EL_OTHER|,.&spell|
|00002300| 69 6e 67 5b 33 32 5d 2c | 0a 58 09 22 6a 22 2c 09 |ing[32],|.X."j",.|
|00002310| 43 4f 4e 53 4f 4e 41 4e | 54 2c 09 26 73 70 65 6c |CONSONAN|T,.&spel|
|00002320| 6c 69 6e 67 5b 33 35 5d | 2c 0a 58 09 22 6b 22 2c |ling[35]|,.X."k",|
|00002330| 09 43 4f 4e 53 4f 4e 41 | 4e 54 2c 09 26 73 70 65 |.CONSONA|NT,.&spe|
|00002340| 6c 6c 69 6e 67 5b 33 38 | 5d 2c 0a 58 09 22 6c 22 |lling[38|],.X."l"|
|00002350| 2c 09 43 4f 4e 53 4f 4e | 41 4e 54 2c 09 26 73 70 |,.CONSON|ANT,.&sp|
|00002360| 65 6c 6c 69 6e 67 5b 34 | 31 5d 2c 0a 58 09 22 6d |elling[4|1],.X."m|
|00002370| 22 2c 09 43 4f 4e 53 4f | 4e 41 4e 54 2c 09 26 73 |",.CONSO|NANT,.&s|
|00002380| 70 65 6c 6c 69 6e 67 5b | 34 33 5d 2c 0a 58 09 22 |pelling[|43],.X."|
|00002390| 6e 22 2c 09 43 4f 4e 53 | 4f 4e 41 4e 54 2c 09 26 |n",.CONS|ONANT,.&|
|000023a0| 73 70 65 6c 6c 69 6e 67 | 5b 34 35 5d 2c 0a 58 09 |spelling|[45],.X.|
|000023b0| 22 6e 67 22 2c 09 43 4f | 4e 53 4f 4e 41 4e 54 2c |"ng",.CO|NSONANT,|
|000023c0| 09 26 73 70 65 6c 6c 69 | 6e 67 5b 34 37 5d 2c 0a |.&spelli|ng[47],.|
|000023d0| 58 09 22 6f 22 2c 09 56 | 4f 57 45 4c 5f 53 48 4f |X."o",.V|OWEL_SHO|
|000023e0| 52 54 2c 09 26 73 70 65 | 6c 6c 69 6e 67 5b 34 39 |RT,.&spe|lling[49|
|000023f0| 5d 2c 0a 58 09 22 4f 22 | 2c 09 56 4f 57 45 4c 5f |],.X."O"|,.VOWEL_|
|00002400| 4c 4f 4e 47 2c 09 26 73 | 70 65 6c 6c 69 6e 67 5b |LONG,.&s|pelling[|
|00002410| 35 33 5d 2c 0a 58 09 22 | 6f 6f 22 2c 09 56 4f 57 |53],.X."|oo",.VOW|
|00002420| 45 4c 5f 53 48 4f 52 54 | 2c 09 26 73 70 65 6c 6c |EL_SHORT|,.&spell|
|00002430| 69 6e 67 5b 35 36 5d 2c | 0a 58 09 22 4f 4f 22 2c |ing[56],|.X."OO",|
|00002440| 09 56 4f 57 45 4c 5f 4c | 4f 4e 47 2c 09 26 73 70 |.VOWEL_L|ONG,.&sp|
|00002450| 65 6c 6c 69 6e 67 5b 35 | 39 5d 2c 0a 58 09 22 70 |elling[5|9],.X."p|
|00002460| 22 2c 09 43 4f 4e 53 4f | 4e 41 4e 54 2c 09 26 73 |",.CONSO|NANT,.&s|
|00002470| 70 65 6c 6c 69 6e 67 5b | 36 32 5d 2c 0a 58 09 22 |pelling[|62],.X."|
|00002480| 71 75 22 2c 09 43 4f 4e | 53 4f 4e 41 4e 54 2c 09 |qu",.CON|SONANT,.|
|00002490| 26 73 70 65 6c 6c 69 6e | 67 5b 36 34 5d 2c 0a 58 |&spellin|g[64],.X|
|000024a0| 09 22 72 22 2c 09 43 4f | 4e 53 4f 4e 41 4e 54 2c |."r",.CO|NSONANT,|
|000024b0| 09 26 73 70 65 6c 6c 69 | 6e 67 5b 36 36 5d 2c 0a |.&spelli|ng[66],.|
|000024c0| 58 09 22 73 22 2c 09 43 | 4f 4e 53 4f 4e 41 4e 54 |X."s",.C|ONSONANT|
|000024d0| 2c 09 26 73 70 65 6c 6c | 69 6e 67 5b 36 38 5d 2c |,.&spell|ing[68],|
|000024e0| 0a 58 09 22 73 68 22 2c | 09 43 4f 4e 53 4f 4e 41 |.X."sh",|.CONSONA|
|000024f0| 4e 54 2c 09 26 73 70 65 | 6c 6c 69 6e 67 5b 37 31 |NT,.&spe|lling[71|
|00002500| 5d 2c 0a 58 09 22 74 22 | 2c 09 43 4f 4e 53 4f 4e |],.X."t"|,.CONSON|
|00002510| 41 4e 54 2c 09 26 73 70 | 65 6c 6c 69 6e 67 5b 37 |ANT,.&sp|elling[7|
|00002520| 34 5d 2c 0a 58 09 22 74 | 68 22 2c 09 43 4f 4e 53 |4],.X."t|h",.CONS|
|00002530| 4f 4e 41 4e 54 2c 09 26 | 73 70 65 6c 6c 69 6e 67 |ONANT,.&|spelling|
|00002540| 5b 37 36 5d 2c 0a 58 09 | 22 54 48 22 2c 09 43 4f |[76],.X.|"TH",.CO|
|00002550| 4e 53 4f 4e 41 4e 54 2c | 09 26 73 70 65 6c 6c 69 |NSONANT,|.&spelli|
|00002560| 6e 67 5b 37 38 5d 2c 0a | 58 09 22 75 22 2c 09 56 |ng[78],.|X."u",.V|
|00002570| 4f 57 45 4c 5f 53 48 4f | 52 54 2c 09 26 73 70 65 |OWEL_SHO|RT,.&spe|
|00002580| 6c 6c 69 6e 67 5b 38 30 | 5d 2c 0a 58 09 22 55 22 |lling[80|],.X."U"|
|00002590| 2c 09 56 4f 57 45 4c 5f | 4c 4f 4e 47 2c 09 26 73 |,.VOWEL_|LONG,.&s|
|000025a0| 70 65 6c 6c 69 6e 67 5b | 38 32 5d 2c 0a 58 09 22 |pelling[|82],.X."|
|000025b0| 76 22 2c 09 43 4f 4e 53 | 4f 4e 41 4e 54 2c 09 26 |v",.CONS|ONANT,.&|
|000025c0| 73 70 65 6c 6c 69 6e 67 | 5b 38 35 5d 2c 0a 58 09 |spelling|[85],.X.|
|000025d0| 22 78 22 2c 09 43 4f 4e | 53 4f 4e 41 4e 54 2c 09 |"x",.CON|SONANT,.|
|000025e0| 26 73 70 65 6c 6c 69 6e | 67 5b 38 37 5d 2c 0a 58 |&spellin|g[87],.X|
|000025f0| 09 22 79 22 2c 09 43 4f | 4e 53 4f 4e 41 4e 54 2c |."y",.CO|NSONANT,|
|00002600| 09 26 73 70 65 6c 6c 69 | 6e 67 5b 38 39 5d 2c 0a |.&spelli|ng[89],.|
|00002610| 58 09 22 7a 22 2c 09 43 | 4f 4e 53 4f 4e 41 4e 54 |X."z",.C|ONSONANT|
|00002620| 2c 09 26 73 70 65 6c 6c | 69 6e 67 5b 39 31 5d 2c |,.&spell|ing[91],|
|00002630| 0a 58 09 30 2c 09 30 2c | 09 09 26 73 70 65 6c 6c |.X.0,.0,|..&spell|
|00002640| 69 6e 67 5b 39 34 5d 2c | 0a 58 7d 3b 0a 58 0a 58 |ing[94],|.X};.X.X|
|00002650| 73 74 72 75 63 74 20 67 | 72 61 70 68 20 2a 76 6f |struct g|raph *vo|
|00002660| 77 65 6c 5b 5d 20 3d 20 | 7b 0a 58 09 26 67 72 61 |wel[] = |{.X.&gra|
|00002670| 70 68 5b 30 5d 2c 09 26 | 67 72 61 70 68 5b 31 5d |ph[0],.&|graph[1]|
|00002680| 2c 09 26 67 72 61 70 68 | 5b 35 5d 2c 09 26 67 72 |,.&graph|[5],.&gr|
|00002690| 61 70 68 5b 36 5d 2c 0a | 58 09 26 67 72 61 70 68 |aph[6],.|X.&graph|
|000026a0| 5b 31 30 5d 2c 09 26 67 | 72 61 70 68 5b 31 31 5d |[10],.&g|raph[11]|
|000026b0| 2c 09 26 67 72 61 70 68 | 5b 31 32 5d 2c 09 26 67 |,.&graph|[12],.&g|
|000026c0| 72 61 70 68 5b 31 39 5d | 2c 0a 58 09 26 67 72 61 |raph[19]|,.X.&gra|
|000026d0| 70 68 5b 32 30 5d 2c 09 | 26 67 72 61 70 68 5b 32 |ph[20],.|&graph[2|
|000026e0| 31 5d 2c 09 26 67 72 61 | 70 68 5b 32 32 5d 2c 09 |1],.&gra|ph[22],.|
|000026f0| 26 67 72 61 70 68 5b 33 | 30 5d 2c 0a 58 09 26 67 |&graph[3|0],.X.&g|
|00002700| 72 61 70 68 5b 33 31 5d | 2c 0a 58 09 28 73 74 72 |raph[31]|,.X.(str|
|00002710| 75 63 74 20 67 72 61 70 | 68 20 2a 29 20 30 2c 0a |uct grap|h *) 0,.|
|00002720| 58 7d 3b 0a 58 0a 58 73 | 74 72 75 63 74 20 67 72 |X};.X.Xs|truct gr|
|00002730| 61 70 68 20 2a 63 6f 6e | 73 6f 6e 61 6e 74 5b 5d |aph *con|sonant[]|
|00002740| 20 3d 20 7b 0a 58 09 26 | 67 72 61 70 68 5b 32 5d | = {.X.&|graph[2]|
|00002750| 2c 09 26 67 72 61 70 68 | 5b 33 5d 2c 09 26 67 72 |,.&graph|[3],.&gr|
|00002760| 61 70 68 5b 34 5d 2c 09 | 26 67 72 61 70 68 5b 37 |aph[4],.|&graph[7|
|00002770| 5d 2c 0a 58 09 26 67 72 | 61 70 68 5b 38 5d 2c 09 |],.X.&gr|aph[8],.|
|00002780| 26 67 72 61 70 68 5b 39 | 5d 2c 09 26 67 72 61 70 |&graph[9|],.&grap|
|00002790| 68 5b 31 33 5d 2c 09 26 | 67 72 61 70 68 5b 31 34 |h[13],.&|graph[14|
|000027a0| 5d 2c 0a 58 09 26 67 72 | 61 70 68 5b 31 35 5d 2c |],.X.&gr|aph[15],|
|000027b0| 09 26 67 72 61 70 68 5b | 31 36 5d 2c 09 26 67 72 |.&graph[|16],.&gr|
|000027c0| 61 70 68 5b 31 37 5d 2c | 09 26 67 72 61 70 68 5b |aph[17],|.&graph[|
|000027d0| 31 38 5d 2c 0a 58 09 26 | 67 72 61 70 68 5b 32 33 |18],.X.&|graph[23|
|000027e0| 5d 2c 09 26 67 72 61 70 | 68 5b 32 34 5d 2c 09 26 |],.&grap|h[24],.&|
|000027f0| 67 72 61 70 68 5b 32 35 | 5d 2c 09 26 67 72 61 70 |graph[25|],.&grap|
|00002800| 68 5b 32 36 5d 2c 0a 58 | 09 26 67 72 61 70 68 5b |h[26],.X|.&graph[|
|00002810| 32 37 5d 2c 09 26 67 72 | 61 70 68 5b 32 38 5d 2c |27],.&gr|aph[28],|
|00002820| 09 26 67 72 61 70 68 5b | 32 39 5d 2c 09 26 67 72 |.&graph[|29],.&gr|
|00002830| 61 70 68 5b 33 32 5d 2c | 0a 58 09 26 67 72 61 70 |aph[32],|.X.&grap|
|00002840| 68 5b 33 33 5d 2c 09 26 | 67 72 61 70 68 5b 33 34 |h[33],.&|graph[34|
|00002850| 5d 2c 09 26 67 72 61 70 | 68 5b 33 35 5d 2c 0a 58 |],.&grap|h[35],.X|
|00002860| 09 28 73 74 72 75 63 74 | 20 67 72 61 70 68 20 2a |.(struct| graph *|
|00002870| 29 20 30 2c 0a 58 7d 3b | 0a 58 0a 58 2f 2a 0a 58 |) 0,.X};|.X.X/*.X|
|00002880| 20 2a 20 52 61 6e 64 6f | 6d 6c 79 20 73 65 6c 65 | * Rando|mly sele|
|00002890| 63 74 20 61 20 67 72 61 | 70 68 20 66 72 6f 6d 20 |ct a gra|ph from |
|000028a0| 74 68 65 20 73 70 65 63 | 69 66 69 65 6c 64 20 61 |the spec|ifield a|
|000028b0| 72 72 61 79 2e 20 20 45 | 76 65 6e 74 75 61 6c 6c |rray. E|ventuall|
|000028c0| 79 2c 20 74 68 69 73 20 | 73 68 6f 75 6c 64 0a 58 |y, this |should.X|
|000028d0| 20 2a 20 61 63 63 6f 75 | 6e 74 20 66 6f 72 20 67 | * accou|nt for g|
|000028e0| 72 61 70 68 20 66 72 65 | 71 75 65 6e 63 69 65 73 |raph fre|quencies|
|000028f0| 20 61 73 20 77 65 6c 6c | 2e 0a 58 20 2a 2f 0a 58 | as well|..X */.X|
|00002900| 0a 58 73 74 72 75 63 74 | 20 67 72 61 70 68 20 2a |.Xstruct| graph *|
|00002910| 73 65 6c 67 72 61 70 68 | 28 67 72 61 70 68 73 29 |selgraph|(graphs)|
|00002920| 0a 58 09 73 74 72 75 63 | 74 20 67 72 61 70 68 20 |.X.struc|t graph |
|00002930| 2a 2a 67 72 61 70 68 73 | 3b 0a 58 7b 0a 58 09 72 |**graphs|;.X{.X.r|
|00002940| 65 67 69 73 74 65 72 20 | 69 6e 74 20 63 6e 74 3b |egister |int cnt;|
|00002950| 0a 58 0a 58 09 66 6f 72 | 20 28 63 6e 74 20 3d 20 |.X.X.for| (cnt = |
|00002960| 30 3b 20 67 72 61 70 68 | 73 5b 63 6e 74 5d 20 21 |0; graph|s[cnt] !|
|00002970| 3d 20 28 73 74 72 75 63 | 74 20 67 72 61 70 68 20 |= (struc|t graph |
|00002980| 2a 29 20 30 3b 20 63 6e | 74 2b 2b 29 0a 58 09 09 |*) 0; cn|t++).X..|
|00002990| 3b 0a 58 09 72 65 74 75 | 72 6e 20 67 72 61 70 68 |;.X.retu|rn graph|
|000029a0| 73 5b 52 41 4e 44 4f 4d | 28 63 6e 74 29 5d 3b 0a |s[RANDOM|(cnt)];.|
|000029b0| 58 7d 0a 58 0a 58 2f 2a | 0a 58 20 2a 20 52 61 6e |X}.X.X/*|.X * Ran|
|000029c0| 64 6f 6d 6c 79 20 73 65 | 6c 65 63 74 20 61 20 73 |domly se|lect a s|
|000029d0| 70 65 6c 6c 69 6e 67 20 | 66 6f 72 20 74 68 65 20 |pelling |for the |
|000029e0| 73 70 65 63 69 66 69 65 | 64 20 67 72 61 70 68 2e |specifie|d graph.|
|000029f0| 20 20 54 68 69 73 20 69 | 73 20 6e 6f 74 20 6c 69 | This i|s not li|
|00002a00| 6e 65 61 72 3a 0a 58 20 | 2a 20 65 61 72 6c 69 65 |near:.X |* earlie|
|00002a10| 72 20 73 70 65 6c 6c 69 | 6e 67 73 20 61 72 65 20 |r spelli|ngs are |
|00002a20| 70 72 65 66 65 72 72 65 | 64 20 6f 76 65 72 20 6c |preferre|d over l|
|00002a30| 61 74 65 72 20 6f 6e 65 | 73 2c 20 62 75 74 20 74 |ater one|s, but t|
|00002a40| 68 65 20 6c 61 74 74 65 | 72 20 64 6f 0a 58 20 2a |he latte|r do.X *|
|00002a50| 20 73 6f 6d 65 74 69 6d | 65 73 20 73 6e 65 61 6b | sometim|es sneak|
|00002a60| 20 69 6e 2e 0a 58 20 2a | 2f 0a 58 0a 58 63 68 61 | in..X *|/.X.Xcha|
|00002a70| 72 20 2a 73 65 6c 73 70 | 65 6c 6c 28 67 72 61 70 |r *selsp|ell(grap|
|00002a80| 68 29 0a 58 09 73 74 72 | 75 63 74 20 67 72 61 70 |h).X.str|uct grap|
|00002a90| 68 20 2a 67 72 61 70 68 | 3b 0a 58 7b 0a 58 09 72 |h *graph|;.X{.X.r|
|00002aa0| 65 67 69 73 74 65 72 20 | 69 6e 74 20 63 6e 74 2c |egister |int cnt,|
|00002ab0| 20 73 65 6c 3b 0a 58 0a | 58 09 66 6f 72 20 28 63 | sel;.X.|X.for (c|
|00002ac0| 6e 74 20 3d 20 30 3b 20 | 67 72 61 70 68 2d 3e 73 |nt = 0; |graph->s|
|00002ad0| 70 65 6c 6c 69 6e 67 73 | 5b 63 6e 74 5d 20 21 3d |pellings|[cnt] !=|
|00002ae0| 20 28 63 68 61 72 20 2a | 29 20 30 3b 20 63 6e 74 | (char *|) 0; cnt|
|00002af0| 2b 2b 29 0a 58 09 09 3b | 0a 58 09 69 66 20 28 63 |++).X..;|.X.if (c|
|00002b00| 6e 74 20 3d 3d 20 30 29 | 20 7b 0a 58 09 09 66 70 |nt == 0)| {.X..fp|
|00002b10| 72 69 6e 74 66 28 73 74 | 64 65 72 72 2c 20 22 50 |rintf(st|derr, "P|
|00002b20| 41 4e 49 43 3a 20 73 65 | 6c 73 70 65 6c 6c 28 25 |ANIC: se|lspell(%|
|00002b30| 73 29 20 67 6f 74 20 63 | 6f 75 6e 74 28 73 70 65 |s) got c|ount(spe|
|00002b40| 6c 6c 69 6e 67 73 29 20 | 3d 3d 20 30 5c 6e 22 2c |llings) |== 0\n",|
|00002b50| 20 67 72 61 70 68 2d 3e | 67 72 61 70 68 29 3b 0a | graph->|graph);.|
|00002b60| 58 09 09 65 78 69 74 28 | 32 29 3b 0a 58 09 7d 0a |X..exit(|2);.X.}.|
|00002b70| 58 09 69 66 20 28 63 6e | 74 20 3d 3d 20 31 29 0a |X.if (cn|t == 1).|
|00002b80| 58 09 09 72 65 74 75 72 | 6e 20 2a 67 72 61 70 68 |X..retur|n *graph|
|00002b90| 2d 3e 73 70 65 6c 6c 69 | 6e 67 73 3b 0a 58 2f 2a |->spelli|ngs;.X/*|
|00002ba0| 0a 58 20 2a 20 54 68 69 | 73 20 6d 61 79 20 6e 6f |.X * Thi|s may no|
|00002bb0| 74 20 62 65 20 74 68 65 | 20 62 65 73 74 20 77 61 |t be the| best wa|
|00002bc0| 79 20 74 6f 20 64 6f 20 | 69 74 2e 2e 2e 20 6d 61 |y to do |it... ma|
|00002bd0| 79 62 65 20 57 65 65 6d | 62 61 27 64 20 63 61 72 |ybe Weem|ba'd car|
|00002be0| 65 20 74 6f 20 6c 65 6e | 64 20 61 0a 58 20 2a 20 |e to len|d a.X * |
|00002bf0| 68 61 6e 64 20 68 65 72 | 65 3f 20 20 41 66 74 65 |hand her|e? Afte|
|00002c00| 72 20 61 6c 6c 2c 20 6d | 79 20 73 70 65 63 69 61 |r all, m|y specia|
|00002c10| 6c 74 79 20 69 73 20 70 | 72 6f 67 72 61 6d 6d 69 |lty is p|rogrammi|
|00002c20| 6e 67 2c 20 4e 4f 54 20 | 6d 61 74 68 2e 0a 58 20 |ng, NOT |math..X |
|00002c30| 2a 2f 0a 58 09 69 66 20 | 28 28 73 65 6c 20 3d 20 |*/.X.if |((sel = |
|00002c40| 63 6e 74 20 2d 20 28 69 | 6e 74 29 20 73 71 72 74 |cnt - (i|nt) sqrt|
|00002c50| 28 28 64 6f 75 62 6c 65 | 29 20 52 41 4e 44 4f 4d |((double|) RANDOM|
|00002c60| 28 63 6e 74 20 2a 20 63 | 6e 74 29 20 2b 20 31 29 |(cnt * c|nt) + 1)|
|00002c70| 20 2d 20 31 29 20 3c 20 | 30 20 7c 7c 20 73 65 6c | - 1) < |0 || sel|
|00002c80| 20 3e 3d 20 63 6e 74 29 | 20 7b 0a 58 23 69 66 64 | >= cnt)| {.X#ifd|
|00002c90| 65 66 20 42 55 47 43 41 | 54 43 48 0a 58 09 09 66 |ef BUGCA|TCH.X..f|
|00002ca0| 70 72 69 6e 74 66 28 73 | 74 64 65 72 72 2c 20 22 |printf(s|tderr, "|
|00002cb0| 50 41 4e 49 43 3a 20 73 | 65 6c 73 70 65 6c 6c 28 |PANIC: s|elspell(|
|00002cc0| 25 73 29 20 67 6f 74 20 | 6e 6c 72 61 6e 64 28 25 |%s) got |nlrand(%|
|00002cd0| 64 29 20 3d 3d 20 25 64 | 5c 6e 22 2c 20 67 72 61 |d) == %d|\n", gra|
|00002ce0| 70 68 2d 3e 67 72 61 70 | 68 2c 20 63 6e 74 2c 20 |ph->grap|h, cnt, |
|00002cf0| 73 65 6c 29 3b 0a 58 09 | 09 65 78 69 74 28 32 29 |sel);.X.|.exit(2)|
|00002d00| 3b 0a 58 23 65 6c 73 65 | 0a 58 09 09 73 65 6c 20 |;.X#else|.X..sel |
|00002d10| 3d 20 30 3b 0a 58 23 65 | 6e 64 69 66 0a 58 09 7d |= 0;.X#e|ndif.X.}|
|00002d20| 0a 58 09 72 65 74 75 72 | 6e 20 67 72 61 70 68 2d |.X.retur|n graph-|
|00002d30| 3e 73 70 65 6c 6c 69 6e | 67 73 5b 73 65 6c 5d 3b |>spellin|gs[sel];|
|00002d40| 0a 58 7d 0a 58 0a 58 2f | 2a 0a 58 20 2a 20 43 68 |.X}.X.X/|*.X * Ch|
|00002d50| 6f 6f 73 65 20 74 68 65 | 20 6e 65 78 74 20 73 6f |oose the| next so|
|00002d60| 75 72 63 65 20 66 6f 72 | 20 61 20 67 72 61 70 68 |urce for| a graph|
|00002d70| 2e 20 20 54 68 65 20 72 | 75 6c 65 73 20 61 72 65 |. The r|ules are|
|00002d80| 3a 20 20 61 20 63 6f 6e | 73 6f 6e 61 6e 74 20 4d |: a con|sonant M|
|00002d90| 55 53 54 20 62 65 0a 58 | 20 2a 20 66 6f 6c 6c 6f |UST be.X| * follo|
|00002da0| 77 65 64 20 62 79 20 61 | 20 76 6f 77 65 6c 3b 20 |wed by a| vowel; |
|00002db0| 61 20 76 6f 77 65 6c 20 | 6d 61 79 20 62 65 20 66 |a vowel |may be f|
|00002dc0| 6f 6c 6c 6f 77 65 64 20 | 62 79 20 61 20 76 6f 77 |ollowed |by a vow|
|00002dd0| 65 6c 20 6f 66 20 61 20 | 64 69 66 66 65 72 65 6e |el of a |differen|
|00002de0| 74 0a 58 20 2a 20 74 79 | 70 65 20 6f 72 20 62 79 |t.X * ty|pe or by|
|00002df0| 20 61 20 63 6f 6e 73 6f | 6e 61 6e 74 2c 20 62 75 | a conso|nant, bu|
|00002e00| 74 20 6e 65 76 65 72 20 | 6d 6f 72 65 20 74 68 61 |t never |more tha|
|00002e10| 6e 20 74 77 6f 20 63 6f | 6e 73 65 63 75 74 69 76 |n two co|nsecutiv|
|00002e20| 65 20 76 6f 77 65 6c 20 | 67 72 61 70 68 73 2e 0a |e vowel |graphs..|
|00002e30| 58 20 2a 2f 0a 58 0a 58 | 63 68 6f 6f 73 65 6e 65 |X */.X.X|choosene|
|00002e40| 78 74 28 63 75 72 2c 20 | 70 72 65 76 29 0a 58 7b |xt(cur, |prev).X{|
|00002e50| 0a 58 09 69 66 20 28 63 | 75 72 20 3d 3d 20 43 4f |.X.if (c|ur == CO|
|00002e60| 4e 53 4f 4e 41 4e 54 29 | 0a 58 09 09 72 65 74 75 |NSONANT)|.X..retu|
|00002e70| 72 6e 20 56 4f 57 45 4c | 5f 4d 41 53 4b 3b 0a 58 |rn VOWEL|_MASK;.X|
|00002e80| 09 65 6c 73 65 20 69 66 | 20 28 70 72 65 76 20 3d |.else if| (prev =|
|00002e90| 3d 20 2d 31 20 7c 7c 20 | 28 70 72 65 76 20 26 20 |= -1 || |(prev & |
|00002ea0| 56 4f 57 45 4c 5f 4d 41 | 53 4b 29 20 21 3d 20 30 |VOWEL_MA|SK) != 0|
|00002eb0| 29 0a 58 09 09 72 65 74 | 75 72 6e 20 43 4f 4e 53 |).X..ret|urn CONS|
|00002ec0| 4f 4e 41 4e 54 3b 0a 58 | 09 65 6c 73 65 20 69 66 |ONANT;.X|.else if|
|00002ed0| 20 28 52 41 4e 44 4f 4d | 28 31 30 29 20 3d 3d 20 | (RANDOM|(10) == |
|00002ee0| 35 29 0a 58 09 09 72 65 | 74 75 72 6e 20 56 4f 57 |5).X..re|turn VOW|
|00002ef0| 45 4c 5f 4d 41 53 4b 3b | 0a 58 09 65 6c 73 65 0a |EL_MASK;|.X.else.|
|00002f00| 58 09 09 72 65 74 75 72 | 6e 20 43 4f 4e 53 4f 4e |X..retur|n CONSON|
|00002f10| 41 4e 54 3b 0a 58 7d 0a | 58 0a 58 2f 2a 0a 58 20 |ANT;.X}.|X.X/*.X |
|00002f20| 2a 20 57 65 20 61 72 65 | 20 70 61 73 73 65 64 20 |* We are| passed |
|00002f30| 61 6e 20 61 72 72 61 79 | 20 6f 66 20 28 73 74 72 |an array| of (str|
|00002f40| 75 63 74 20 67 72 61 70 | 68 20 2a 29 3b 20 63 68 |uct grap|h *); ch|
|00002f50| 6f 6f 73 65 20 61 6e 20 | 65 6e 74 72 79 20 72 61 |oose an |entry ra|
|00002f60| 6e 64 6f 6d 6c 79 20 61 | 6e 64 0a 58 20 2a 20 61 |ndomly a|nd.X * a|
|00002f70| 73 73 65 6d 62 6c 65 20 | 61 20 73 74 72 69 6e 67 |ssemble |a string|
|00002f80| 20 66 69 74 74 69 6e 67 | 20 74 68 65 20 73 69 7a | fitting| the siz|
|00002f90| 65 20 63 6f 6e 73 74 72 | 61 69 6e 74 2e 20 20 57 |e constr|aint. W|
|00002fa0| 65 20 75 73 65 20 74 68 | 65 20 6f 72 69 67 69 6e |e use th|e origin|
|00002fb0| 61 6c 20 28 4f 53 49 29 | 0a 58 20 2a 20 70 61 72 |al (OSI)|.X * par|
|00002fc0| 61 64 69 67 6d 3a 20 20 | 61 6c 74 65 72 6e 61 74 |adigm: |alternat|
|00002fd0| 65 20 63 6f 6e 73 6f 6e | 61 6e 74 73 20 61 6e 64 |e conson|ants and|
|00002fe0| 20 76 6f 77 65 6c 73 2c | 20 77 69 74 68 20 74 68 | vowels,| with th|
|00002ff0| 65 20 6f 70 74 69 6f 6e | 20 6f 66 20 74 77 6f 20 |e option| of two |
|00003000| 76 6f 77 65 6c 73 0a 58 | 20 2a 20 69 6e 20 61 20 |vowels.X| * in a |
|00003010| 72 6f 77 20 6f 63 63 61 | 73 69 6f 6e 61 6c 6c 79 |row occa|sionally|
|00003020| 2e 20 20 54 68 65 20 6f | 6e 6c 79 20 64 69 66 66 |. The o|nly diff|
|00003030| 65 72 65 6e 63 65 20 69 | 73 20 74 68 61 74 20 74 |erence i|s that t|
|00003040| 68 65 79 20 6d 75 73 74 | 20 62 65 20 64 69 66 66 |hey must| be diff|
|00003050| 65 72 65 6e 74 0a 58 20 | 2a 20 2a 74 79 70 65 73 |erent.X |* *types|
|00003060| 2a 20 6f 66 20 76 6f 77 | 65 6c 73 2c 20 61 20 64 |* of vow|els, a d|
|00003070| 69 73 74 69 6e 63 74 69 | 6f 6e 20 74 68 61 74 20 |istincti|on that |
|00003080| 74 68 65 20 4f 53 49 20 | 76 65 72 73 69 6f 6e 20 |the OSI |version |
|00003090| 64 69 64 6e 27 74 20 63 | 6f 6e 73 69 64 65 72 2e |didn't c|onsider.|
|000030a0| 0a 58 20 2a 2f 0a 58 0a | 58 70 77 67 65 6e 28 69 |.X */.X.|Xpwgen(i|
|000030b0| 6e 69 74 69 61 6c 2c 20 | 70 77 2c 20 6d 61 78 6c |nitial, |pw, maxl|
|000030c0| 65 6e 29 0a 58 09 73 74 | 72 75 63 74 20 67 72 61 |en).X.st|ruct gra|
|000030d0| 70 68 20 2a 2a 69 6e 69 | 74 69 61 6c 3b 0a 58 09 |ph **ini|tial;.X.|
|000030e0| 63 68 61 72 20 2a 70 77 | 3b 0a 58 7b 0a 58 09 69 |char *pw|;.X{.X.i|
|000030f0| 6e 74 20 70 77 6c 65 6e | 2c 20 73 74 61 74 65 2c |nt pwlen|, state,|
|00003100| 20 70 72 65 76 2c 20 74 | 6d 70 3b 0a 58 09 73 74 | prev, t|mp;.X.st|
|00003110| 72 75 63 74 20 67 72 61 | 70 68 20 2a 67 72 61 70 |ruct gra|ph *grap|
|00003120| 68 3b 0a 58 09 63 68 61 | 72 20 2a 73 70 65 6c 6c |h;.X.cha|r *spell|
|00003130| 69 6e 67 3b 0a 58 0a 58 | 09 70 77 6c 65 6e 20 3d |ing;.X.X|.pwlen =|
|00003140| 20 30 3b 0a 58 09 73 74 | 61 74 65 20 3d 20 69 6e | 0;.X.st|ate = in|
|00003150| 69 74 69 61 6c 5b 30 5d | 2d 3e 74 79 70 65 3b 0a |itial[0]|->type;.|
|00003160| 58 09 70 72 65 76 20 3d | 20 2d 31 3b 0a 58 09 77 |X.prev =| -1;.X.w|
|00003170| 68 69 6c 65 20 28 70 77 | 6c 65 6e 20 3c 20 6d 61 |hile (pw|len < ma|
|00003180| 78 6c 65 6e 20 2d 20 31 | 29 20 7b 0a 58 09 09 64 |xlen - 1|) {.X..d|
|00003190| 6f 20 7b 0a 58 09 09 09 | 67 72 61 70 68 20 3d 20 |o {.X...|graph = |
|000031a0| 73 65 6c 67 72 61 70 68 | 28 69 6e 69 74 69 61 6c |selgraph|(initial|
|000031b0| 29 3b 0a 58 09 09 7d 20 | 77 68 69 6c 65 20 28 73 |);.X..} |while (s|
|000031c0| 74 61 74 65 20 21 3d 20 | 43 4f 4e 53 4f 4e 41 4e |tate != |CONSONAN|
|000031d0| 54 20 26 26 20 67 72 61 | 70 68 2d 3e 74 79 70 65 |T && gra|ph->type|
|000031e0| 20 3d 3d 20 70 72 65 76 | 29 3b 0a 58 09 09 69 66 | == prev|);.X..if|
|000031f0| 20 28 28 73 70 65 6c 6c | 69 6e 67 20 3d 20 73 65 | ((spell|ing = se|
|00003200| 6c 73 70 65 6c 6c 28 67 | 72 61 70 68 29 29 20 3d |lspell(g|raph)) =|
|00003210| 3d 20 28 63 68 61 72 20 | 2a 29 20 30 29 20 7b 0a |= (char |*) 0) {.|
|00003220| 58 09 09 09 66 70 72 69 | 6e 74 66 28 73 74 64 65 |X...fpri|ntf(stde|
|00003230| 72 72 2c 20 22 50 41 4e | 49 43 3a 20 67 6f 74 20 |rr, "PAN|IC: got |
|00003240| 4e 55 4c 4c 20 69 6e 20 | 73 65 6c 73 70 65 6c 6c |NULL in |selspell|
|00003250| 28 25 73 29 5c 6e 22 2c | 20 67 72 61 70 68 2d 3e |(%s)\n",| graph->|
|00003260| 67 72 61 70 68 29 3b 0a | 58 09 09 09 65 78 69 74 |graph);.|X...exit|
|00003270| 28 32 29 3b 0a 58 09 09 | 7d 0a 58 09 09 73 74 72 |(2);.X..|}.X..str|
|00003280| 63 70 79 28 70 77 2c 20 | 73 70 65 6c 6c 69 6e 67 |cpy(pw, |spelling|
|00003290| 29 3b 0a 58 09 09 77 68 | 69 6c 65 20 28 2a 70 77 |);.X..wh|ile (*pw|
|000032a0| 20 21 3d 20 27 5c 30 27 | 29 0a 58 09 09 09 70 77 | != '\0'|).X...pw|
|000032b0| 6c 65 6e 2b 2b 2c 20 70 | 77 2b 2b 3b 0a 58 09 09 |len++, p|w++;.X..|
|000032c0| 74 6d 70 20 3d 20 70 72 | 65 76 3b 0a 58 09 09 70 |tmp = pr|ev;.X..p|
|000032d0| 72 65 76 20 3d 20 67 72 | 61 70 68 2d 3e 74 79 70 |rev = gr|aph->typ|
|000032e0| 65 3b 0a 58 09 09 69 66 | 20 28 28 73 74 61 74 65 |e;.X..if| ((state|
|000032f0| 20 3d 20 63 68 6f 6f 73 | 65 6e 65 78 74 28 70 72 | = choos|enext(pr|
|00003300| 65 76 2c 20 74 6d 70 29 | 29 20 3d 3d 20 43 4f 4e |ev, tmp)|) == CON|
|00003310| 53 4f 4e 41 4e 54 29 0a | 58 09 09 09 69 6e 69 74 |SONANT).|X...init|
|00003320| 69 61 6c 20 3d 20 63 6f | 6e 73 6f 6e 61 6e 74 3b |ial = co|nsonant;|
|00003330| 0a 58 09 09 65 6c 73 65 | 0a 58 09 09 09 69 6e 69 |.X..else|.X...ini|
|00003340| 74 69 61 6c 20 3d 20 76 | 6f 77 65 6c 3b 0a 58 09 |tial = v|owel;.X.|
|00003350| 7d 0a 58 7d 0a 58 0a 58 | 2f 2a 0a 58 20 2a 20 3d |}.X}.X.X|/*.X * =|
|00003360| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003370| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 20 20 45 |========|===== E|
|00003380| 6e 64 20 6f 66 20 70 77 | 67 65 6e 20 20 3d 3d 3d |nd of pw|gen ===|
|00003390| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000033a0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 0a 58 20 2a 2f |========|===.X */|
|000033b0| 0a 58 0c 0a 58 23 69 6e | 63 6c 75 64 65 20 3c 70 |.X..X#in|clude <p|
|000033c0| 77 64 2e 68 3e 0a 58 23 | 69 6e 63 6c 75 64 65 20 |wd.h>.X#|include |
|000033d0| 3c 63 74 79 70 65 2e 68 | 3e 0a 58 23 69 6e 63 6c |<ctype.h|>.X#incl|
|000033e0| 75 64 65 20 3c 73 79 73 | 2f 74 79 70 65 73 2e 68 |ude <sys|/types.h|
|000033f0| 3e 0a 58 23 69 6e 63 6c | 75 64 65 20 3c 73 79 73 |>.X#incl|ude <sys|
|00003400| 2f 73 74 61 74 2e 68 3e | 0a 58 0a 58 23 64 65 66 |/stat.h>|.X.X#def|
|00003410| 69 6e 65 20 54 41 43 50 | 57 46 49 4c 45 20 22 2e |ine TACP|WFILE ".|
|00003420| 2f 70 77 66 69 6c 65 22 | 0a 58 23 64 65 66 69 6e |/pwfile"|.X#defin|
|00003430| 65 20 54 4d 50 50 57 46 | 49 4c 45 20 22 2f 74 6d |e TMPPWF|ILE "/tm|
|00003440| 70 2f 74 61 63 70 61 73 | 73 77 64 2e 58 58 58 58 |p/tacpas|swd.XXXX|
|00003450| 58 58 22 0a 58 23 64 65 | 66 69 6e 65 20 50 57 5f |XX".X#de|fine PW_|
|00003460| 4e 41 4d 4c 45 4e 20 38 | 09 09 09 09 2f 2a 20 6d |NAMLEN 8|..../* m|
|00003470| 61 78 20 6c 65 6e 67 74 | 68 20 75 73 65 72 20 6e |ax lengt|h user n|
|00003480| 61 6d 65 20 2a 2f 0a 58 | 23 64 65 66 69 6e 65 20 |ame */.X|#define |
|00003490| 50 57 5f 50 57 44 4c 45 | 4e 20 38 09 09 09 09 2f |PW_PWDLE|N 8..../|
|000034a0| 2a 20 6d 61 78 20 6c 65 | 6e 67 74 68 20 70 61 73 |* max le|ngth pas|
|000034b0| 73 77 6f 72 64 20 20 2a | 2f 0a 58 23 64 65 66 69 |sword *|/.X#defi|
|000034c0| 6e 65 20 47 45 4e 5f 50 | 57 44 4c 45 4e 20 38 09 |ne GEN_P|WDLEN 8.|
|000034d0| 09 09 09 2f 2a 20 6c 65 | 6e 67 74 68 20 6f 66 20 |.../* le|ngth of |
|000034e0| 67 65 6e 20 70 61 73 73 | 77 64 20 2a 2f 0a 58 23 |gen pass|wd */.X#|
|000034f0| 64 65 66 69 6e 65 20 53 | 50 41 43 45 5f 50 41 53 |define S|PACE_PAS|
|00003500| 53 57 44 20 32 30 09 09 | 09 09 2f 2a 20 72 6f 6f |SWD 20..|../* roo|
|00003510| 6d 20 61 6c 6c 6f 63 61 | 74 65 64 20 66 6f 72 20 |m alloca|ted for |
|00003520| 65 6e 63 20 70 61 73 73 | 77 64 20 2a 2f 0a 58 23 |enc pass|wd */.X#|
|00003530| 64 65 66 69 6e 65 20 53 | 50 41 43 45 5f 44 41 54 |define S|PACE_DAT|
|00003540| 45 20 32 30 09 09 09 09 | 2f 2a 20 72 6f 6f 6d 20 |E 20....|/* room |
|00003550| 61 6c 6c 6f 63 61 74 65 | 64 20 66 6f 72 20 65 78 |allocate|d for ex|
|00003560| 70 20 64 61 74 65 20 2a | 2f 0a 58 23 64 65 66 69 |p date *|/.X#defi|
|00003570| 6e 65 20 53 48 4f 52 54 | 54 49 4d 45 20 33 30 0a |ne SHORT|TIME 30.|
|00003580| 58 23 64 65 66 69 6e 65 | 20 4c 4f 4e 47 54 49 4d |X#define| LONGTIM|
|00003590| 45 20 31 38 30 0a 58 0a | 58 23 64 65 66 69 6e 65 |E 180.X.|X#define|
|000035a0| 20 46 53 45 45 4b 5f 46 | 5f 42 45 47 49 4e 20 30 | FSEEK_F|_BEGIN 0|
|000035b0| 0a 58 23 64 65 66 69 6e | 65 20 46 53 45 45 4b 5f |.X#defin|e FSEEK_|
|000035c0| 46 5f 43 55 52 52 20 20 | 31 0a 58 23 64 65 66 69 |F_CURR |1.X#defi|
|000035d0| 6e 65 20 46 53 45 45 4b | 5f 46 5f 45 4e 44 20 20 |ne FSEEK|_F_END |
|000035e0| 20 32 0a 58 0a 58 2f 2a | 0a 58 20 2a 20 47 6c 6f | 2.X.X/*|.X * Glo|
|000035f0| 62 61 6c 20 73 74 6f 72 | 61 67 65 0a 58 20 2a 2f |bal stor|age.X */|
|00003600| 0a 58 63 68 61 72 20 2a | 77 68 6f 61 6d 69 3b 0a |.Xchar *|whoami;.|
|00003610| 58 46 49 4c 45 20 2a 70 | 77 66 69 6c 65 2c 20 2a |XFILE *p|wfile, *|
|00003620| 74 6d 70 70 77 66 69 6c | 65 3b 0a 58 0a 58 2f 2a |tmppwfil|e;.X.X/*|
|00003630| 0a 58 20 2a 20 46 6f 72 | 77 61 72 64 20 64 65 63 |.X * For|ward dec|
|00003640| 6c 61 72 61 74 69 6f 6e | 73 0a 58 20 2a 2f 0a 58 |laration|s.X */.X|
|00003650| 63 68 61 72 20 2a 6d 6b | 74 65 6d 70 28 29 2c 20 |char *mk|temp(), |
|00003660| 2a 67 65 74 70 61 73 73 | 28 29 2c 20 2a 63 72 79 |*getpass|(), *cry|
|00003670| 70 74 28 29 3b 0a 58 73 | 74 72 75 63 74 20 70 61 |pt();.Xs|truct pa|
|00003680| 73 73 77 64 20 2a 66 67 | 65 74 70 77 65 6e 74 28 |sswd *fg|etpwent(|
|00003690| 29 3b 0a 58 0c 0a 58 2f | 2a 0a 58 20 2a 20 6d 79 |);.X..X/|*.X * my|
|000036a0| 5f 65 78 69 74 0a 58 20 | 2a 0a 58 20 2a 20 43 6c |_exit.X |*.X * Cl|
|000036b0| 6f 73 65 20 61 6e 64 20 | 72 65 6d 6f 76 65 20 74 |ose and |remove t|
|000036c0| 68 65 20 74 65 6d 70 6f | 72 61 72 79 20 66 69 6c |he tempo|rary fil|
|000036d0| 65 20 69 66 20 6e 65 63 | 65 73 73 61 72 79 2c 20 |e if nec|essary, |
|000036e0| 61 6e 64 20 74 68 65 6e | 20 65 78 69 74 2e 0a 58 |and then| exit..X|
|000036f0| 20 2a 2f 0a 58 6d 79 5f | 65 78 69 74 28 63 6f 64 | */.Xmy_|exit(cod|
|00003700| 65 29 0a 58 69 6e 74 20 | 63 6f 64 65 3b 0a 58 7b |e).Xint |code;.X{|
|00003710| 0a 58 20 20 20 20 69 66 | 20 28 74 6d 70 70 77 66 |.X if| (tmppwf|
|00003720| 69 6c 65 29 0a 58 09 66 | 63 6c 6f 73 65 28 74 6d |ile).X.f|close(tm|
|00003730| 70 70 77 66 69 6c 65 29 | 3b 0a 58 20 20 20 20 65 |ppwfile)|;.X e|
|00003740| 78 69 74 28 63 6f 64 65 | 29 3b 0a 58 7d 0a 58 0c |xit(code|);.X}.X.|
|00003750| 0a 58 2f 2a 0a 58 20 2a | 20 76 61 6c 69 64 0a 58 |.X/*.X *| valid.X|
|00003760| 20 2a 0a 58 20 2a 20 56 | 61 6c 69 64 61 65 20 74 | *.X * V|alidae t|
|00003770| 68 69 73 20 6e 61 6d 65 | 2f 70 61 73 73 77 6f 72 |his name|/passwor|
|00003780| 64 20 70 61 69 72 20 61 | 67 61 69 6e 73 74 20 74 |d pair a|gainst t|
|00003790| 68 65 20 63 75 72 72 65 | 6e 74 20 72 65 63 6f 72 |he curre|nt recor|
|000037a0| 64 2e 0a 58 20 2a 2f 0a | 58 76 61 6c 69 64 28 65 |d..X */.|Xvalid(e|
|000037b0| 6e 74 72 79 2c 20 6e 61 | 6d 65 2c 20 77 6f 72 64 |ntry, na|me, word|
|000037c0| 29 0a 58 20 20 20 20 73 | 74 72 75 63 74 20 70 61 |).X s|truct pa|
|000037d0| 73 73 77 64 20 2a 65 6e | 74 72 79 3b 0a 58 20 20 |sswd *en|try;.X |
|000037e0| 20 20 63 68 61 72 20 2a | 6e 61 6d 65 2c 20 2a 77 | char *|name, *w|
|000037f0| 6f 72 64 3b 0a 58 7b 0a | 58 20 20 20 20 63 68 61 |ord;.X{.|X cha|
|00003800| 72 20 73 61 6c 74 5b 32 | 5d 3b 0a 58 0a 58 20 20 |r salt[2|];.X.X |
|00003810| 20 20 69 66 20 28 73 74 | 72 63 6d 70 28 6e 61 6d | if (st|rcmp(nam|
|00003820| 65 2c 20 65 6e 74 72 79 | 2d 3e 70 77 5f 6e 61 6d |e, entry|->pw_nam|
|00003830| 65 29 20 21 3d 20 30 29 | 0a 58 09 72 65 74 75 72 |e) != 0)|.X.retur|
|00003840| 6e 28 30 29 3b 0a 58 0a | 58 20 20 20 20 73 74 72 |n(0);.X.|X str|
|00003850| 6e 63 70 79 28 73 61 6c | 74 2c 20 65 6e 74 72 79 |ncpy(sal|t, entry|
|00003860| 2d 3e 70 77 5f 70 61 73 | 73 77 64 2c 20 32 29 3b |->pw_pas|swd, 2);|
|00003870| 0a 58 20 20 20 20 69 66 | 20 28 73 74 72 63 6d 70 |.X if| (strcmp|
|00003880| 28 65 6e 74 72 79 2d 3e | 70 77 5f 70 61 73 73 77 |(entry->|pw_passw|
|00003890| 64 2c 20 63 72 79 70 74 | 28 77 6f 72 64 2c 20 73 |d, crypt|(word, s|
|000038a0| 61 6c 74 29 29 20 21 3d | 20 30 29 0a 58 09 72 65 |alt)) !=| 0).X.re|
|000038b0| 74 75 72 6e 28 30 29 3b | 0a 58 0a 58 20 20 20 20 |turn(0);|.X.X |
|000038c0| 72 65 74 75 72 6e 28 31 | 29 3b 0a 58 7d 0a 58 2f |return(1|);.X}.X/|
|000038d0| 2a 0a 58 20 2a 20 75 70 | 64 61 74 65 5f 65 78 70 |*.X * up|date_exp|
|000038e0| 69 72 61 74 69 6f 6e 0a | 58 20 2a 0a 58 20 2a 20 |iration.|X *.X * |
|000038f0| 55 70 64 61 74 65 20 74 | 68 65 20 65 78 70 69 72 |Update t|he expir|
|00003900| 61 74 69 6f 6e 20 64 61 | 74 65 20 6f 6e 20 74 68 |ation da|te on th|
|00003910| 69 73 20 65 6e 74 72 79 | 2e 20 20 50 61 73 73 77 |is entry|. Passw|
|00003920| 6f 72 64 73 20 65 78 70 | 69 72 65 20 31 38 30 20 |ords exp|ire 180 |
|00003930| 64 61 79 73 0a 58 20 2a | 20 61 66 74 65 72 20 74 |days.X *| after t|
|00003940| 68 65 79 20 61 72 65 20 | 69 6e 69 74 69 61 6c 6c |hey are |initiall|
|00003950| 79 20 73 65 74 20 6f 72 | 20 63 68 61 6e 67 65 64 |y set or| changed|
|00003960| 2e 0a 58 20 2a 2f 0a 58 | 75 70 64 61 74 65 5f 65 |..X */.X|update_e|
|00003970| 78 70 69 72 61 74 69 6f | 6e 28 65 6e 74 72 79 29 |xpiratio|n(entry)|
|00003980| 0a 58 20 20 20 20 73 74 | 72 75 63 74 20 70 61 73 |.X st|ruct pas|
|00003990| 73 77 64 20 2a 65 6e 74 | 72 79 3b 0a 58 7b 0a 58 |swd *ent|ry;.X{.X|
|000039a0| 20 20 20 20 6c 6f 6e 67 | 20 6e 6f 77 2c 20 64 61 | long| now, da|
|000039b0| 79 2c 20 79 65 61 72 2c | 20 64 65 6c 74 61 3b 0a |y, year,| delta;.|
|000039c0| 58 20 20 20 20 63 68 61 | 72 20 6d 6f 6e 74 68 5b |X cha|r month[|
|000039d0| 31 30 5d 2c 20 74 69 6d | 65 73 74 72 69 6e 67 5b |10], tim|estring[|
|000039e0| 32 36 5d 3b 0a 58 0a 58 | 20 20 20 20 69 66 20 28 |26];.X.X| if (|
|000039f0| 65 6e 74 72 79 2d 3e 70 | 77 5f 73 68 65 6c 6c 29 |entry->p|w_shell)|
|00003a00| 20 7b 0a 58 09 69 66 20 | 28 73 73 63 61 6e 66 28 | {.X.if |(sscanf(|
|00003a10| 65 6e 74 72 79 2d 3e 70 | 77 5f 73 68 65 6c 6c 2c |entry->p|w_shell,|
|00003a20| 20 22 25 73 20 25 64 20 | 25 64 2c 20 25 64 22 2c | "%s %d |%d, %d",|
|00003a30| 20 6d 6f 6e 74 68 2c 20 | 26 64 61 79 2c 20 26 79 | month, |&day, &y|
|00003a40| 65 61 72 2c 20 26 64 65 | 6c 74 61 29 20 21 3d 20 |ear, &de|lta) != |
|00003a50| 34 29 0a 58 09 20 20 20 | 20 72 65 74 75 72 6e 28 |4).X. | return(|
|00003a60| 30 29 3b 0a 58 09 66 72 | 65 65 28 65 6e 74 72 79 |0);.X.fr|ee(entry|
|00003a70| 2d 3e 70 77 5f 73 68 65 | 6c 6c 29 3b 0a 58 20 20 |->pw_she|ll);.X |
|00003a80| 20 20 7d 20 65 6c 73 65 | 0a 58 09 72 65 74 75 72 | } else|.X.retur|
|00003a90| 6e 28 30 29 3b 0a 58 0a | 58 20 20 20 20 69 66 20 |n(0);.X.|X if |
|00003aa0| 28 64 65 6c 74 61 20 21 | 3d 20 31 38 30 29 0a 58 |(delta !|= 180).X|
|00003ab0| 09 72 65 74 75 72 6e 28 | 30 29 3b 0a 58 0a 58 20 |.return(|0);.X.X |
|00003ac0| 20 20 20 74 69 6d 65 28 | 26 6e 6f 77 29 3b 0a 58 | time(|&now);.X|
|00003ad0| 20 20 20 20 6e 6f 77 20 | 2b 3d 20 64 65 6c 74 61 | now |+= delta|
|00003ae0| 20 2a 20 32 34 20 2a 20 | 36 30 20 2a 20 36 30 3b | * 24 * |60 * 60;|
|00003af0| 0a 58 20 20 20 20 73 74 | 72 63 70 79 28 74 69 6d |.X st|rcpy(tim|
|00003b00| 65 73 74 72 69 6e 67 2c | 20 63 74 69 6d 65 28 26 |estring,| ctime(&|
|00003b10| 6e 6f 77 29 29 3b 0a 58 | 0a 58 20 20 20 20 65 6e |now));.X|.X en|
|00003b20| 74 72 79 2d 3e 70 77 5f | 73 68 65 6c 6c 20 3d 20 |try->pw_|shell = |
|00003b30| 28 63 68 61 72 20 2a 29 | 6d 61 6c 6c 6f 63 28 53 |(char *)|malloc(S|
|00003b40| 50 41 43 45 5f 44 41 54 | 45 29 3b 0a 58 20 20 20 |PACE_DAT|E);.X |
|00003b50| 20 73 70 72 69 6e 74 66 | 28 65 6e 74 72 79 2d 3e | sprintf|(entry->|
|00003b60| 70 77 5f 73 68 65 6c 6c | 2c 20 22 25 36 2e 36 73 |pw_shell|, "%6.6s|
|00003b70| 20 25 34 2e 34 73 2c 20 | 25 64 22 2c 20 74 69 6d | %4.4s, |%d", tim|
|00003b80| 65 73 74 72 69 6e 67 2b | 34 2c 20 74 69 6d 65 73 |estring+|4, times|
|00003b90| 74 72 69 6e 67 2b 32 30 | 2c 0a 58 09 20 20 20 20 |tring+20|,.X. |
|00003ba0| 64 65 6c 74 61 29 3b 0a | 58 0a 58 20 20 20 20 72 |delta);.|X.X r|
|00003bb0| 65 74 75 72 6e 28 31 29 | 3b 0a 58 7d 0a 58 0c 0a |eturn(1)|;.X}.X..|
|00003bc0| 58 2f 2a 0a 58 20 2a 20 | 6d 61 6b 65 5f 70 61 73 |X/*.X * |make_pas|
|00003bd0| 73 77 64 0a 58 20 2a 0a | 58 20 2a 20 54 68 69 73 |swd.X *.|X * This|
|00003be0| 20 72 6f 75 74 69 6e 65 | 20 73 65 74 73 20 75 70 | routine| sets up|
|00003bf0| 20 61 6e 64 20 63 61 6c | 6c 73 20 74 68 65 20 70 | and cal|ls the p|
|00003c00| 61 73 73 77 6f 72 64 20 | 67 65 6e 65 72 61 74 69 |assword |generati|
|00003c10| 6f 6e 20 72 6f 75 74 69 | 6e 65 73 2e 20 20 49 74 |on routi|nes. It|
|00003c20| 0a 58 20 2a 20 65 6e 63 | 72 79 70 74 73 20 74 68 |.X * enc|rypts th|
|00003c30| 65 20 72 65 73 75 6c 74 | 2c 20 61 6e 64 20 73 74 |e result|, and st|
|00003c40| 6f 72 65 73 20 69 74 20 | 69 6e 20 74 68 65 20 70 |ores it |in the p|
|00003c50| 61 73 73 77 6f 72 64 20 | 66 69 65 6c 64 20 6f 66 |assword |field of|
|00003c60| 20 74 68 65 0a 58 20 2a | 20 73 74 72 75 63 74 75 | the.X *| structu|
|00003c70| 72 65 2e 0a 58 20 2a 2f | 0a 58 6d 61 6b 65 5f 70 |re..X */|.Xmake_p|
|00003c80| 61 73 73 77 64 28 65 6e | 74 72 79 29 0a 58 20 20 |asswd(en|try).X |
|00003c90| 20 20 73 74 72 75 63 74 | 20 70 61 73 73 77 64 20 | struct| passwd |
|00003ca0| 2a 65 6e 74 72 79 3b 0a | 58 7b 0a 58 20 20 20 20 |*entry;.|X{.X |
|00003cb0| 63 68 61 72 20 67 65 6e | 70 61 73 73 77 64 5b 32 |char gen|passwd[2|
|00003cc0| 30 5d 2c 20 73 61 6c 74 | 5b 32 5d 3b 0a 58 0a 58 |0], salt|[2];.X.X|
|00003cd0| 20 20 20 20 70 77 67 65 | 6e 28 28 52 41 4e 44 4f | pwge|n((RANDO|
|00003ce0| 4d 28 31 30 29 20 3c 20 | 34 3f 20 76 6f 77 65 6c |M(10) < |4? vowel|
|00003cf0| 3a 20 63 6f 6e 73 6f 6e | 61 6e 74 29 2c 20 67 65 |: conson|ant), ge|
|00003d00| 6e 70 61 73 73 77 64 2c | 20 47 45 4e 5f 50 57 44 |npasswd,| GEN_PWD|
|00003d10| 4c 45 4e 29 3b 0a 58 0a | 58 20 20 20 20 73 61 6c |LEN);.X.|X sal|
|00003d20| 74 5b 30 5d 20 3d 20 27 | 5c 30 27 3b 0a 58 20 20 |t[0] = '|\0';.X |
|00003d30| 20 20 73 61 6c 74 5b 31 | 5d 20 3d 20 27 5c 30 27 | salt[1|] = '\0'|
|00003d40| 3b 0a 58 20 20 20 20 77 | 68 69 6c 65 20 28 21 69 |;.X w|hile (!i|
|00003d50| 73 61 6c 70 68 61 28 73 | 61 6c 74 5b 30 5d 29 29 |salpha(s|alt[0]))|
|00003d60| 0a 58 20 20 20 20 20 20 | 73 61 6c 74 5b 30 5d 20 |.X |salt[0] |
|00003d70| 3d 20 72 61 6e 64 6f 6d | 28 29 20 26 20 30 78 37 |= random|() & 0x7|
|00003d80| 66 20 3b 0a 58 20 20 20 | 20 77 68 69 6c 65 20 28 |f ;.X | while (|
|00003d90| 21 69 73 61 6c 70 68 61 | 28 73 61 6c 74 5b 31 5d |!isalpha|(salt[1]|
|00003da0| 29 29 0a 58 20 20 20 20 | 20 20 73 61 6c 74 5b 31 |)).X | salt[1|
|00003db0| 5d 20 3d 20 72 61 6e 64 | 6f 6d 28 29 20 26 20 30 |] = rand|om() & 0|
|00003dc0| 78 37 66 20 3b 0a 58 20 | 20 20 20 69 66 20 28 65 |x7f ;.X | if (e|
|00003dd0| 6e 74 72 79 2d 3e 70 77 | 5f 70 61 73 73 77 64 29 |ntry->pw|_passwd)|
|00003de0| 0a 58 09 66 72 65 65 28 | 65 6e 74 72 79 2d 3e 70 |.X.free(|entry->p|
|00003df0| 77 5f 70 61 73 73 77 64 | 29 3b 0a 58 20 20 20 20 |w_passwd|);.X |
|00003e00| 65 6e 74 72 79 2d 3e 70 | 77 5f 70 61 73 73 77 64 |entry->p|w_passwd|
|00003e10| 20 3d 20 28 63 68 61 72 | 20 2a 29 6d 61 6c 6c 6f | = (char| *)mallo|
|00003e20| 63 28 53 50 41 43 45 5f | 50 41 53 53 57 44 29 3b |c(SPACE_|PASSWD);|
|00003e30| 0a 58 20 20 20 20 73 74 | 72 63 70 79 28 65 6e 74 |.X st|rcpy(ent|
|00003e40| 72 79 2d 3e 70 77 5f 70 | 61 73 73 77 64 2c 20 63 |ry->pw_p|asswd, c|
|00003e50| 72 79 70 74 28 67 65 6e | 70 61 73 73 77 64 2c 20 |rypt(gen|passwd, |
|00003e60| 73 61 6c 74 29 29 3b 0a | 58 20 20 20 20 70 72 69 |salt));.|X pri|
|00003e70| 6e 74 66 28 22 4e 65 77 | 20 70 61 73 73 77 6f 72 |ntf("New| passwor|
|00003e80| 64 20 66 6f 72 20 25 73 | 20 69 73 20 5c 22 25 73 |d for %s| is \"%s|
|00003e90| 5c 22 5c 6e 22 2c 20 65 | 6e 74 72 79 2d 3e 70 77 |\"\n", e|ntry->pw|
|00003ea0| 5f 6e 61 6d 65 2c 20 67 | 65 6e 70 61 73 73 77 64 |_name, g|enpasswd|
|00003eb0| 29 3b 0a 58 7d 0a 58 0c | 0a 58 2f 2a 0a 58 20 2a |);.X}.X.|.X/*.X *|
|00003ec0| 20 63 6f 70 79 5f 70 77 | 66 69 6c 65 31 0a 58 20 | copy_pw|file1.X |
|00003ed0| 2a 0a 58 20 2a 20 43 6f | 70 79 20 61 6c 6c 20 65 |*.X * Co|py all e|
|00003ee0| 6e 74 72 69 65 73 20 69 | 6e 20 74 68 65 20 70 61 |ntries i|n the pa|
|00003ef0| 73 73 77 6f 72 64 20 66 | 69 6c 65 20 62 65 66 6f |ssword f|ile befo|
|00003f00| 72 65 20 74 68 65 20 6f | 6e 65 20 77 65 20 61 72 |re the o|ne we ar|
|00003f10| 65 20 69 6e 74 65 72 65 | 73 74 65 64 20 69 6e 2e |e intere|sted in.|
|00003f20| 0a 58 20 2a 2f 0a 58 73 | 74 72 75 63 74 20 70 61 |.X */.Xs|truct pa|
|00003f30| 73 73 77 64 20 2a 0a 58 | 63 6f 70 79 5f 70 77 66 |sswd *.X|copy_pwf|
|00003f40| 69 6c 65 31 28 6e 61 6d | 65 29 0a 58 20 20 20 20 |ile1(nam|e).X |
|00003f50| 63 68 61 72 20 2a 6e 61 | 6d 65 3b 0a 58 7b 0a 58 |char *na|me;.X{.X|
|00003f60| 20 20 20 20 73 74 72 75 | 63 74 20 70 61 73 73 77 | stru|ct passw|
|00003f70| 64 20 2a 63 75 72 72 65 | 6e 74 3b 0a 58 0a 58 20 |d *curre|nt;.X.X |
|00003f80| 20 20 20 66 73 65 65 6b | 28 70 77 66 69 6c 65 2c | fseek|(pwfile,|
|00003f90| 20 30 2c 20 46 53 45 45 | 4b 5f 46 5f 42 45 47 49 | 0, FSEE|K_F_BEGI|
|00003fa0| 4e 29 3b 0a 58 20 20 20 | 20 77 68 69 6c 65 20 28 |N);.X | while (|
|00003fb0| 21 66 65 6f 66 28 70 77 | 66 69 6c 65 29 29 20 7b |!feof(pw|file)) {|
|00003fc0| 0a 58 09 63 75 72 72 65 | 6e 74 20 3d 20 66 67 65 |.X.curre|nt = fge|
|00003fd0| 74 70 77 65 6e 74 28 70 | 77 66 69 6c 65 29 3b 0a |tpwent(p|wfile);.|
|00003fe0| 58 09 69 66 20 28 63 75 | 72 72 65 6e 74 20 26 26 |X.if (cu|rrent &&|
|00003ff0| 20 73 74 72 6e 63 6d 70 | 28 63 75 72 72 65 6e 74 | strncmp|(current|
|00004000| 2d 3e 70 77 5f 6e 61 6d | 65 2c 20 6e 61 6d 65 2c |->pw_nam|e, name,|
|00004010| 20 50 57 5f 4e 41 4d 4c | 45 4e 29 20 21 3d 20 30 | PW_NAML|EN) != 0|
|00004020| 29 20 7b 0a 58 09 20 20 | 20 20 69 66 20 28 70 75 |) {.X. | if (pu|
|00004030| 74 70 77 65 6e 74 28 63 | 75 72 72 65 6e 74 2c 20 |tpwent(c|urrent, |
|00004040| 74 6d 70 70 77 66 69 6c | 65 29 20 21 3d 20 30 29 |tmppwfil|e) != 0)|
|00004050| 20 7b 0a 58 09 09 66 70 | 72 69 6e 74 66 28 73 74 | {.X..fp|rintf(st|
|00004060| 64 65 72 72 2c 20 22 25 | 73 3a 20 43 61 6e 6e 6f |derr, "%|s: Canno|
|00004070| 74 20 70 75 74 20 63 75 | 72 72 65 6e 74 20 65 6e |t put cu|rrent en|
|00004080| 74 72 79 20 66 6f 72 20 | 25 30 2e 2a 73 5c 6e 22 |try for |%0.*s\n"|
|00004090| 2c 0a 58 09 09 09 77 68 | 6f 61 6d 69 2c 20 50 57 |,.X...wh|oami, PW|
|000040a0| 5f 4e 41 4d 4c 45 4e 2c | 20 63 75 72 72 65 6e 74 |_NAMLEN,| current|
|000040b0| 2d 3e 70 77 5f 6e 61 6d | 65 29 3b 0a 58 09 09 70 |->pw_nam|e);.X..p|
|000040c0| 65 72 72 6f 72 28 77 68 | 6f 61 6d 69 29 3b 0a 58 |error(wh|oami);.X|
|000040d0| 09 09 6d 79 5f 65 78 69 | 74 28 31 29 3b 0a 58 09 |..my_exi|t(1);.X.|
|000040e0| 20 20 20 20 7d 0a 58 09 | 7d 20 65 6c 73 65 20 7b | }.X.|} else {|
|000040f0| 0a 58 09 20 20 20 20 72 | 65 74 75 72 6e 28 63 75 |.X. r|eturn(cu|
|00004100| 72 72 65 6e 74 29 3b 0a | 58 09 7d 0a 58 20 20 20 |rrent);.|X.}.X |
|00004110| 20 7d 0a 58 20 20 20 20 | 72 65 74 75 72 6e 28 4e | }.X |return(N|
|00004120| 55 4c 4c 29 3b 0a 58 7d | 0a 58 0c 0a 58 2f 2a 0a |ULL);.X}|.X..X/*.|
|00004130| 58 20 2a 20 63 6f 70 79 | 5f 70 77 66 69 6c 65 32 |X * copy|_pwfile2|
|00004140| 0a 58 20 2a 0a 58 20 2a | 20 41 64 64 20 74 68 65 |.X *.X *| Add the|
|00004150| 20 6e 65 77 2f 6d 6f 64 | 69 66 69 65 64 20 65 6e | new/mod|ified en|
|00004160| 74 72 79 2e 20 20 43 6f | 70 79 20 61 6c 6c 20 65 |try. Co|py all e|
|00004170| 6e 74 72 69 65 73 20 69 | 6e 20 74 68 65 20 70 61 |ntries i|n the pa|
|00004180| 73 73 77 6f 72 64 20 66 | 69 6c 65 20 61 66 74 65 |ssword f|ile afte|
|00004190| 72 0a 58 20 2a 20 74 68 | 65 20 6f 6e 65 20 77 65 |r.X * th|e one we|
|000041a0| 20 61 72 65 20 69 6e 74 | 65 72 65 73 74 65 64 20 | are int|erested |
|000041b0| 69 6e 2e 0a 58 20 2a 2f | 0a 58 63 6f 70 79 5f 70 |in..X */|.Xcopy_p|
|000041c0| 77 66 69 6c 65 32 28 6e | 65 77 29 0a 58 20 20 20 |wfile2(n|ew).X |
|000041d0| 20 73 74 72 75 63 74 20 | 70 61 73 73 77 64 20 2a | struct |passwd *|
|000041e0| 6e 65 77 3b 0a 58 7b 0a | 58 20 20 20 20 73 74 72 |new;.X{.|X str|
|000041f0| 75 63 74 20 70 61 73 73 | 77 64 20 2a 63 75 72 72 |uct pass|wd *curr|
|00004200| 65 6e 74 3b 0a 58 20 0a | 58 20 20 20 20 69 66 20 |ent;.X .|X if |
|00004210| 28 70 75 74 70 77 65 6e | 74 28 6e 65 77 2c 20 74 |(putpwen|t(new, t|
|00004220| 6d 70 70 77 66 69 6c 65 | 29 20 21 3d 20 30 29 20 |mppwfile|) != 0) |
|00004230| 7b 0a 58 09 66 70 72 69 | 6e 74 66 28 73 74 64 65 |{.X.fpri|ntf(stde|
|00004240| 72 72 2c 20 22 25 73 3a | 20 43 61 6e 6e 6f 74 20 |rr, "%s:| Cannot |
|00004250| 70 75 74 20 6e 65 77 20 | 65 6e 74 72 79 20 66 6f |put new |entry fo|
|00004260| 72 20 25 30 2e 2a 73 5c | 6e 22 2c 0a 58 09 09 77 |r %0.*s\|n",.X..w|
|00004270| 68 6f 61 6d 69 2c 20 50 | 57 5f 4e 41 4d 4c 45 4e |hoami, P|W_NAMLEN|
|00004280| 2c 20 6e 65 77 2d 3e 70 | 77 5f 6e 61 6d 65 29 3b |, new->p|w_name);|
|00004290| 0a 58 09 70 65 72 72 6f | 72 28 77 68 6f 61 6d 69 |.X.perro|r(whoami|
|000042a0| 29 3b 0a 58 09 6d 79 5f | 65 78 69 74 28 31 29 3b |);.X.my_|exit(1);|
|000042b0| 0a 58 20 20 20 20 7d 0a | 58 0a 58 20 20 20 20 77 |.X }.|X.X w|
|000042c0| 68 69 6c 65 20 28 21 66 | 65 6f 66 28 70 77 66 69 |hile (!f|eof(pwfi|
|000042d0| 6c 65 29 29 20 7b 0a 58 | 09 63 75 72 72 65 6e 74 |le)) {.X|.current|
|000042e0| 20 3d 20 66 67 65 74 70 | 77 65 6e 74 28 70 77 66 | = fgetp|went(pwf|
|000042f0| 69 6c 65 29 3b 0a 58 09 | 69 66 20 28 63 75 72 72 |ile);.X.|if (curr|
|00004300| 65 6e 74 20 26 26 20 70 | 75 74 70 77 65 6e 74 28 |ent && p|utpwent(|
|00004310| 63 75 72 72 65 6e 74 2c | 20 74 6d 70 70 77 66 69 |current,| tmppwfi|
|00004320| 6c 65 29 20 21 3d 20 30 | 29 20 7b 0a 58 09 20 20 |le) != 0|) {.X. |
|00004330| 20 20 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 | fprint|f(stderr|
|00004340| 2c 20 22 25 73 3a 20 43 | 61 6e 6e 6f 74 20 70 75 |, "%s: C|annot pu|
|00004350| 74 20 63 75 72 72 65 6e | 74 20 65 6e 74 72 79 20 |t curren|t entry |
|00004360| 66 6f 72 20 25 30 2e 2a | 73 5c 6e 22 2c 0a 58 09 |for %0.*|s\n",.X.|
|00004370| 09 20 20 20 20 77 68 6f | 61 6d 69 2c 20 50 57 5f |. who|ami, PW_|
|00004380| 4e 41 4d 4c 45 4e 2c 20 | 63 75 72 72 65 6e 74 2d |NAMLEN, |current-|
|00004390| 3e 70 77 5f 6e 61 6d 65 | 29 3b 0a 58 09 20 20 20 |>pw_name|);.X. |
|000043a0| 20 70 65 72 72 6f 72 28 | 77 68 6f 61 6d 69 29 3b | perror(|whoami);|
|000043b0| 0a 58 09 20 20 20 20 6d | 79 5f 65 78 69 74 28 31 |.X. m|y_exit(1|
|000043c0| 29 3b 0a 58 09 7d 0a 58 | 20 20 20 20 7d 0a 58 7d |);.X.}.X| }.X}|
|000043d0| 0a 58 0c 0a 58 2f 2a 0a | 58 20 2a 20 63 6f 70 79 |.X..X/*.|X * copy|
|000043e0| 5f 62 61 63 6b 0a 58 20 | 2a 0a 58 20 2a 20 43 6f |_back.X |*.X * Co|
|000043f0| 70 79 20 74 68 65 20 6e | 65 77 20 66 69 6c 65 20 |py the n|ew file |
|00004400| 62 61 63 6b 20 69 6e 74 | 6f 20 74 68 65 20 6f 72 |back int|o the or|
|00004410| 69 67 69 6e 61 6c 20 66 | 69 6c 65 2e 20 20 43 61 |iginal f|ile. Ca|
|00004420| 6e 27 74 20 75 73 65 20 | 72 65 6e 61 6d 65 2c 0a |n't use |rename,.|
|00004430| 58 20 2a 20 62 65 63 61 | 75 73 65 20 74 68 65 20 |X * beca|use the |
|00004440| 66 69 6c 65 73 20 61 72 | 65 6e 27 74 20 67 75 61 |files ar|en't gua|
|00004450| 72 61 6e 74 65 65 64 20 | 74 6f 20 62 65 20 6f 6e |ranteed |to be on|
|00004460| 20 74 68 65 20 73 61 6d | 65 20 66 69 6c 65 20 73 | the sam|e file s|
|00004470| 79 73 74 65 6d 2e 0a 58 | 20 2a 2f 0a 58 63 6f 70 |ystem..X| */.Xcop|
|00004480| 79 5f 62 61 63 6b 28 29 | 0a 58 7b 0a 58 20 20 20 |y_back()|.X{.X |
|00004490| 20 63 68 61 72 20 62 75 | 66 66 65 72 5b 34 30 39 | char bu|ffer[409|
|000044a0| 36 5d 3b 0a 58 20 20 20 | 20 69 6e 74 20 63 6f 75 |6];.X | int cou|
|000044b0| 6e 74 3b 0a 58 0a 58 20 | 20 20 20 66 73 65 65 6b |nt;.X.X | fseek|
|000044c0| 28 70 77 66 69 6c 65 2c | 20 30 2c 20 46 53 45 45 |(pwfile,| 0, FSEE|
|000044d0| 4b 5f 46 5f 42 45 47 49 | 4e 29 3b 0a 58 20 20 20 |K_F_BEGI|N);.X |
|000044e0| 20 66 73 65 65 6b 28 74 | 6d 70 70 77 66 69 6c 65 | fseek(t|mppwfile|
|000044f0| 2c 20 30 2c 20 46 53 45 | 45 4b 5f 46 5f 42 45 47 |, 0, FSE|EK_F_BEG|
|00004500| 49 4e 29 3b 0a 58 0a 58 | 20 20 20 20 77 68 69 6c |IN);.X.X| whil|
|00004510| 65 20 28 28 63 6f 75 6e | 74 20 3d 20 66 72 65 61 |e ((coun|t = frea|
|00004520| 64 28 62 75 66 66 65 72 | 2c 20 73 69 7a 65 6f 66 |d(buffer|, sizeof|
|00004530| 28 63 68 61 72 29 2c 20 | 34 30 39 36 2c 20 74 6d |(char), |4096, tm|
|00004540| 70 70 77 66 69 6c 65 29 | 29 20 3e 20 30 29 0a 58 |ppwfile)|) > 0).X|
|00004550| 20 20 20 20 20 20 66 77 | 72 69 74 65 28 62 75 66 | fw|rite(buf|
|00004560| 66 65 72 2c 20 73 69 7a | 65 6f 66 28 63 68 61 72 |fer, siz|eof(char|
|00004570| 29 2c 20 63 6f 75 6e 74 | 2c 20 70 77 66 69 6c 65 |), count|, pwfile|
|00004580| 29 3b 0a 58 0a 58 20 20 | 20 20 66 63 6c 6f 73 65 |);.X.X | fclose|
|00004590| 28 70 77 66 69 6c 65 29 | 3b 0a 58 20 20 20 20 66 |(pwfile)|;.X f|
|000045a0| 63 6c 6f 73 65 28 74 6d | 70 70 77 66 69 6c 65 29 |close(tm|ppwfile)|
|000045b0| 3b 0a 58 7d 0a 58 0c 0a | 58 2f 2a 0a 58 20 2a 20 |;.X}.X..|X/*.X * |
|000045c0| 67 65 74 75 73 65 72 0a | 58 20 2a 0a 58 20 2a 20 |getuser.|X *.X * |
|000045d0| 47 65 74 20 61 20 75 73 | 65 72 6e 61 6d 65 20 61 |Get a us|ername a|
|000045e0| 6e 64 20 70 61 73 73 77 | 6f 72 64 2e 20 20 46 61 |nd passw|ord. Fa|
|000045f0| 69 6c 20 75 70 6f 6e 20 | 65 6e 64 20 6f 66 20 66 |il upon |end of f|
|00004600| 69 6c 65 2e 0a 58 20 2a | 2f 0a 58 67 65 74 75 73 |ile..X *|/.Xgetus|
|00004610| 65 72 28 6e 61 6d 65 2c | 20 64 61 74 61 29 0a 58 |er(name,| data).X|
|00004620| 20 20 20 20 63 68 61 72 | 20 2a 6e 61 6d 65 2c 20 | char| *name, |
|00004630| 2a 64 61 74 61 3b 0a 58 | 7b 0a 58 20 20 20 20 63 |*data;.X|{.X c|
|00004640| 68 61 72 20 62 75 66 66 | 65 72 5b 31 30 30 5d 3b |har buff|er[100];|
|00004650| 0a 58 20 20 20 20 69 6e | 74 20 69 3b 0a 58 0a 58 |.X in|t i;.X.X|
|00004660| 20 20 20 20 6e 61 6d 65 | 5b 30 5d 20 3d 20 27 5c | name|[0] = '\|
|00004670| 30 27 3b 0a 58 20 20 20 | 20 77 68 69 6c 65 20 28 |0';.X | while (|
|00004680| 73 74 72 6c 65 6e 28 6e | 61 6d 65 29 20 3d 3d 20 |strlen(n|ame) == |
|00004690| 30 29 20 7b 0a 58 09 70 | 72 69 6e 74 66 28 22 54 |0) {.X.p|rintf("T|
|000046a0| 41 43 41 43 53 20 55 73 | 65 72 6e 61 6d 65 3a 20 |ACACS Us|ername: |
|000046b0| 22 29 3b 0a 58 09 69 66 | 20 28 21 66 67 65 74 73 |");.X.if| (!fgets|
|000046c0| 28 62 75 66 66 65 72 2c | 20 31 30 30 2c 20 73 74 |(buffer,| 100, st|
|000046d0| 64 69 6e 29 20 7c 7c 20 | 66 65 6f 66 28 73 74 64 |din) || |feof(std|
|000046e0| 69 6e 29 29 20 7b 0a 58 | 09 20 20 20 20 70 65 72 |in)) {.X|. per|
|000046f0| 72 6f 72 28 77 68 6f 61 | 6d 69 29 3b 0a 58 09 20 |ror(whoa|mi);.X. |
|00004700| 20 20 20 72 65 74 75 72 | 6e 28 30 29 3b 0a 58 09 | retur|n(0);.X.|
|00004710| 7d 0a 58 09 73 74 72 6e | 63 70 79 28 6e 61 6d 65 |}.X.strn|cpy(name|
|00004720| 2c 20 62 75 66 66 65 72 | 2c 20 50 57 5f 4e 41 4d |, buffer|, PW_NAM|
|00004730| 4c 45 4e 29 3b 0a 58 09 | 66 6f 72 20 28 69 20 3d |LEN);.X.|for (i =|
|00004740| 20 30 3b 20 69 20 3c 20 | 50 57 5f 4e 41 4d 4c 45 | 0; i < |PW_NAMLE|
|00004750| 4e 3b 20 69 2b 2b 29 0a | 58 09 20 20 20 20 69 66 |N; i++).|X. if|
|00004760| 20 28 6e 61 6d 65 5b 69 | 5d 20 3d 3d 20 27 5c 6e | (name[i|] == '\n|
|00004770| 27 29 0a 58 09 09 6e 61 | 6d 65 5b 69 5d 20 3d 20 |').X..na|me[i] = |
|00004780| 27 5c 30 27 3b 0a 58 09 | 6e 61 6d 65 5b 50 57 5f |'\0';.X.|name[PW_|
|00004790| 4e 41 4d 4c 45 4e 5d 20 | 3d 20 27 5c 30 27 3b 0a |NAMLEN] |= '\0';.|
|000047a0| 58 20 20 20 20 7d 0a 58 | 0a 58 20 20 20 20 73 74 |X }.X|.X st|
|000047b0| 72 6e 63 70 79 28 64 61 | 74 61 2c 20 67 65 74 70 |rncpy(da|ta, getp|
|000047c0| 61 73 73 28 22 4f 6c 64 | 20 50 61 73 73 77 6f 72 |ass("Old| Passwor|
|000047d0| 64 3a 20 22 29 2c 20 50 | 57 5f 50 57 44 4c 45 4e |d: "), P|W_PWDLEN|
|000047e0| 29 3b 0a 58 20 20 20 20 | 69 66 20 28 66 65 6f 66 |);.X |if (feof|
|000047f0| 28 73 74 64 69 6e 29 29 | 0a 58 09 72 65 74 75 72 |(stdin))|.X.retur|
|00004800| 6e 28 30 29 3b 0a 58 0a | 58 20 20 20 20 72 65 74 |n(0);.X.|X ret|
|00004810| 75 72 6e 28 31 29 3b 0a | 58 7d 0a 58 0c 0a 58 2f |urn(1);.|X}.X..X/|
|00004820| 2a 0a 58 20 2a 20 77 61 | 69 74 66 6f 72 75 73 65 |*.X * wa|itforuse|
|00004830| 72 0a 58 20 2a 0a 58 20 | 2a 20 57 61 69 74 20 66 |r.X *.X |* Wait f|
|00004840| 6f 72 20 74 68 65 20 75 | 73 65 72 20 74 6f 20 73 |or the u|ser to s|
|00004850| 61 79 20 68 65 20 69 73 | 20 64 6f 6e 65 2e 0a 58 |ay he is| done..X|
|00004860| 20 2a 2f 0a 58 77 61 69 | 74 66 6f 72 75 73 65 72 | */.Xwai|tforuser|
|00004870| 28 29 0a 58 7b 0a 58 20 | 20 20 20 70 72 69 6e 74 |().X{.X | print|
|00004880| 66 28 22 48 69 74 20 74 | 68 65 20 27 72 65 74 75 |f("Hit t|he 'retu|
|00004890| 72 6e 27 20 6b 65 79 20 | 74 6f 20 65 78 69 74 2e |rn' key |to exit.|
|000048a0| 22 29 3b 0a 58 20 20 20 | 20 67 65 74 63 68 61 72 |");.X | getchar|
|000048b0| 28 29 3b 0a 58 7d 0a 58 | 0c 0a 58 2f 2a 0a 58 20 |();.X}.X|..X/*.X |
|000048c0| 2a 20 69 6e 69 74 0a 58 | 20 2a 0a 58 20 2a 20 49 |* init.X| *.X * I|
|000048d0| 6e 69 74 69 61 6c 69 7a | 65 20 74 68 65 20 70 72 |nitializ|e the pr|
|000048e0| 6f 67 72 61 6d 2e 0a 58 | 20 2a 2f 0a 58 69 6e 69 |ogram..X| */.Xini|
|000048f0| 74 28 61 72 67 63 2c 20 | 61 72 67 76 29 0a 58 20 |t(argc, |argv).X |
|00004900| 20 20 20 69 6e 74 20 61 | 72 67 63 3b 0a 58 20 20 | int a|rgc;.X |
|00004910| 20 20 63 68 61 72 20 2a | 2a 61 72 67 76 3b 0a 58 | char *|*argv;.X|
|00004920| 7b 0a 58 20 20 20 20 63 | 68 61 72 20 2a 63 2c 20 |{.X c|har *c, |
|00004930| 2a 74 6d 70 70 77 66 69 | 6c 65 6e 61 6d 65 2c 20 |*tmppwfi|lename, |
|00004940| 74 65 6d 70 6c 61 74 65 | 5b 31 30 30 5d 3b 0a 58 |template|[100];.X|
|00004950| 0a 58 20 20 20 20 77 68 | 6f 61 6d 69 20 3d 20 61 |.X wh|oami = a|
|00004960| 72 67 76 5b 30 5d 3b 0a | 58 0a 58 20 20 20 20 2f |rgv[0];.|X.X /|
|00004970| 2a 0a 58 20 20 20 20 20 | 2a 20 4f 70 65 6e 20 54 |*.X |* Open T|
|00004980| 41 43 20 70 61 73 73 77 | 6f 72 64 20 66 69 6c 65 |AC passw|ord file|
|00004990| 2c 20 61 6e 64 20 73 63 | 72 61 74 63 68 20 66 69 |, and sc|ratch fi|
|000049a0| 6c 65 0a 58 20 20 20 20 | 20 2a 2f 0a 58 20 20 20 |le.X | */.X |
|000049b0| 20 69 66 20 28 70 77 66 | 69 6c 65 29 0a 58 09 66 | if (pwf|ile).X.f|
|000049c0| 63 6c 6f 73 65 28 70 77 | 66 69 6c 65 29 3b 0a 58 |close(pw|file);.X|
|000049d0| 20 20 20 20 69 66 20 28 | 28 70 77 66 69 6c 65 20 | if (|(pwfile |
|000049e0| 3d 20 66 6f 70 65 6e 28 | 54 41 43 50 57 46 49 4c |= fopen(|TACPWFIL|
|000049f0| 45 2c 20 22 61 2b 22 29 | 29 20 3d 3d 20 4e 55 4c |E, "a+")|) == NUL|
|00004a00| 4c 29 20 7b 0a 58 09 66 | 70 72 69 6e 74 66 28 73 |L) {.X.f|printf(s|
|00004a10| 74 64 65 72 72 2c 20 22 | 25 73 3a 20 63 61 6e 6e |tderr, "|%s: cann|
|00004a20| 6f 74 20 6f 70 65 6e 20 | 54 41 43 41 43 53 20 70 |ot open |TACACS p|
|00004a30| 61 73 73 77 6f 72 64 20 | 66 69 6c 65 5c 6e 22 2c |assword |file\n",|
|00004a40| 20 77 68 6f 61 6d 69 29 | 3b 0a 58 09 70 65 72 72 | whoami)|;.X.perr|
|00004a50| 6f 72 28 77 68 6f 61 6d | 69 29 3b 0a 58 09 6d 79 |or(whoam|i);.X.my|
|00004a60| 5f 65 78 69 74 28 31 29 | 3b 0a 58 20 20 20 20 7d |_exit(1)|;.X }|
|00004a70| 0a 58 20 20 20 20 73 74 | 72 63 70 79 28 74 65 6d |.X st|rcpy(tem|
|00004a80| 70 6c 61 74 65 2c 20 54 | 4d 50 50 57 46 49 4c 45 |plate, T|MPPWFILE|
|00004a90| 29 3b 0a 58 20 20 20 20 | 74 6d 70 70 77 66 69 6c |);.X |tmppwfil|
|00004aa0| 65 6e 61 6d 65 20 3d 20 | 6d 6b 74 65 6d 70 28 74 |ename = |mktemp(t|
|00004ab0| 65 6d 70 6c 61 74 65 29 | 3b 0a 58 20 20 20 20 69 |emplate)|;.X i|
|00004ac0| 66 20 28 74 6d 70 70 77 | 66 69 6c 65 29 0a 58 09 |f (tmppw|file).X.|
|00004ad0| 66 63 6c 6f 73 65 28 74 | 6d 70 70 77 66 69 6c 65 |fclose(t|mppwfile|
|00004ae0| 29 3b 0a 58 20 20 20 20 | 69 66 20 28 28 74 6d 70 |);.X |if ((tmp|
|00004af0| 70 77 66 69 6c 65 20 3d | 20 66 6f 70 65 6e 28 74 |pwfile =| fopen(t|
|00004b00| 6d 70 70 77 66 69 6c 65 | 6e 61 6d 65 2c 20 22 77 |mppwfile|name, "w|
|00004b10| 2b 22 29 29 20 3d 3d 20 | 4e 55 4c 4c 29 20 7b 0a |+")) == |NULL) {.|
|00004b20| 58 09 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 |X.fprint|f(stderr|
|00004b30| 2c 20 22 25 73 3a 20 63 | 61 6e 6e 6f 74 20 6f 70 |, "%s: c|annot op|
|00004b40| 65 6e 20 74 65 6d 70 6f | 72 61 72 79 20 66 69 6c |en tempo|rary fil|
|00004b50| 65 20 25 73 5c 6e 22 2c | 20 77 68 6f 61 6d 69 2c |e %s\n",| whoami,|
|00004b60| 20 74 6d 70 70 77 66 69 | 6c 65 6e 61 6d 65 29 3b | tmppwfi|lename);|
|00004b70| 0a 58 09 70 65 72 72 6f | 72 28 77 68 6f 61 6d 69 |.X.perro|r(whoami|
|00004b80| 29 3b 0a 58 09 6d 79 5f | 65 78 69 74 28 31 29 3b |);.X.my_|exit(1);|
|00004b90| 0a 58 20 20 20 20 7d 0a | 58 20 20 20 20 69 66 20 |.X }.|X if |
|00004ba0| 28 75 6e 6c 69 6e 6b 28 | 74 6d 70 70 77 66 69 6c |(unlink(|tmppwfil|
|00004bb0| 65 6e 61 6d 65 29 20 21 | 3d 20 30 29 20 7b 0a 58 |ename) !|= 0) {.X|
|00004bc0| 09 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c |.fprintf|(stderr,|
|00004bd0| 20 22 25 73 3a 20 63 61 | 6e 6e 6f 74 20 75 6e 6c | "%s: ca|nnot unl|
|00004be0| 69 6e 6b 20 74 65 6d 70 | 6f 72 61 72 79 20 66 69 |ink temp|orary fi|
|00004bf0| 6c 65 20 25 73 5c 6e 22 | 2c 20 77 68 6f 61 6d 69 |le %s\n"|, whoami|
|00004c00| 2c 20 74 6d 70 70 77 66 | 69 6c 65 6e 61 6d 65 29 |, tmppwf|ilename)|
|00004c10| 3b 0a 58 09 70 65 72 72 | 6f 72 28 77 68 6f 61 6d |;.X.perr|or(whoam|
|00004c20| 69 29 3b 0a 58 09 6d 79 | 5f 65 78 69 74 28 31 29 |i);.X.my|_exit(1)|
|00004c30| 3b 0a 58 20 20 20 20 7d | 0a 58 0a 58 20 20 20 20 |;.X }|.X.X |
|00004c40| 73 72 61 6e 64 6f 6d 28 | 74 69 6d 65 28 30 29 20 |srandom(|time(0) |
|00004c50| 2b 20 28 67 65 74 70 67 | 72 70 28 29 20 3c 3c 20 |+ (getpg|rp() << |
|00004c60| 38 29 20 2b 20 67 65 74 | 70 69 64 28 29 29 3b 0a |8) + get|pid());.|
|00004c70| 58 7d 0a 58 0c 0a 58 6d | 61 69 6e 28 61 72 67 63 |X}.X..Xm|ain(argc|
|00004c80| 2c 20 61 72 67 76 29 0a | 58 20 20 20 20 69 6e 74 |, argv).|X int|
|00004c90| 20 61 72 67 63 3b 0a 58 | 20 20 20 20 63 68 61 72 | argc;.X| char|
|00004ca0| 20 2a 2a 61 72 67 76 3b | 0a 58 7b 0a 58 20 20 20 | **argv;|.X{.X |
|00004cb0| 20 73 74 72 75 63 74 20 | 70 61 73 73 77 64 20 2a | struct |passwd *|
|00004cc0| 65 6e 74 72 79 3b 0a 58 | 20 20 20 20 63 68 61 72 |entry;.X| char|
|00004cd0| 20 75 73 65 72 6e 61 6d | 65 5b 31 30 5d 2c 20 70 | usernam|e[10], p|
|00004ce0| 61 73 73 77 6f 72 64 5b | 31 30 5d 3b 0a 58 20 20 |assword[|10];.X |
|00004cf0| 20 20 69 6e 74 20 69 2c | 20 64 6f 6e 65 3b 0a 58 | int i,| done;.X|
|00004d00| 0a 58 20 20 20 20 66 6f | 72 20 28 69 20 3d 20 30 |.X fo|r (i = 0|
|00004d10| 3b 20 69 20 3c 20 33 3b | 20 69 2b 2b 29 20 7b 0a |; i < 3;| i++) {.|
|00004d20| 58 09 69 6e 69 74 28 61 | 72 67 63 2c 20 61 72 67 |X.init(a|rgc, arg|
|00004d30| 76 29 3b 0a 58 0a 58 09 | 69 66 20 28 21 67 65 74 |v);.X.X.|if (!get|
|00004d40| 75 73 65 72 28 75 73 65 | 72 6e 61 6d 65 2c 20 70 |user(use|rname, p|
|00004d50| 61 73 73 77 6f 72 64 29 | 29 0a 58 09 20 20 20 20 |assword)|).X. |
|00004d60| 72 65 74 75 72 6e 28 31 | 29 3b 0a 58 0a 58 09 65 |return(1|);.X.X.e|
|00004d70| 6e 74 72 79 20 3d 20 63 | 6f 70 79 5f 70 77 66 69 |ntry = c|opy_pwfi|
|00004d80| 6c 65 31 28 75 73 65 72 | 6e 61 6d 65 29 3b 0a 58 |le1(user|name);.X|
|00004d90| 09 69 66 20 28 21 65 6e | 74 72 79 29 20 7b 0a 58 |.if (!en|try) {.X|
|00004da0| 09 20 20 20 20 70 72 69 | 6e 74 66 28 22 49 20 63 |. pri|ntf("I c|
|00004db0| 61 6e 6e 6f 74 20 66 69 | 6e 64 20 61 20 75 73 65 |annot fi|nd a use|
|00004dc0| 72 20 6e 61 6d 65 64 20 | 27 25 73 27 20 69 6e 20 |r named |'%s' in |
|00004dd0| 74 68 65 20 54 41 43 41 | 43 53 20 64 61 74 61 62 |the TACA|CS datab|
|00004de0| 61 73 65 2e 5c 6e 22 2c | 20 75 73 65 72 6e 61 6d |ase.\n",| usernam|
|00004df0| 65 29 3b 0a 58 09 20 20 | 20 20 70 72 69 6e 74 66 |e);.X. | printf|
|00004e00| 28 22 50 6c 65 61 73 65 | 20 63 6f 6e 74 61 63 74 |("Please| contact|
|00004e10| 20 63 69 73 63 6f 20 45 | 6e 67 69 6e 65 72 69 6e | cisco E|nginerin|
|00004e20| 67 20 66 6f 72 20 61 73 | 73 69 73 74 61 6e 63 65 |g for as|sistance|
|00004e30| 2e 5c 6e 22 29 3b 0a 58 | 09 20 20 20 20 6d 79 5f |.\n");.X|. my_|
|00004e40| 65 78 69 74 28 31 29 3b | 0a 58 09 7d 0a 58 0a 58 |exit(1);|.X.}.X.X|
|00004e50| 09 69 66 20 28 21 76 61 | 6c 69 64 28 65 6e 74 72 |.if (!va|lid(entr|
|00004e60| 79 2c 20 75 73 65 72 6e | 61 6d 65 2c 20 70 61 73 |y, usern|ame, pas|
|00004e70| 73 77 6f 72 64 29 29 20 | 7b 0a 58 09 20 20 20 20 |sword)) |{.X. |
|00004e80| 70 72 69 6e 74 66 28 22 | 59 6f 75 20 74 79 70 65 |printf("|You type|
|00004e90| 64 20 61 6e 20 69 6e 63 | 6f 72 72 65 63 74 20 75 |d an inc|orrect u|
|00004ea0| 73 65 72 6e 61 6d 65 2f | 70 61 73 73 77 6f 72 64 |sername/|password|
|00004eb0| 20 63 6f 6d 62 69 6e 61 | 69 6f 6e 2e 5c 6e 22 29 | combina|ion.\n")|
|00004ec0| 3b 0a 58 09 20 20 20 20 | 70 72 69 6e 74 66 28 22 |;.X. |printf("|
|00004ed0| 50 6c 65 61 73 65 20 74 | 72 79 20 61 67 61 69 6e |Please t|ry again|
|00004ee0| 5c 6e 5c 6e 22 29 3b 0a | 58 09 20 20 20 20 63 6f |\n\n");.|X. co|
|00004ef0| 6e 74 69 6e 75 65 3b 0a | 58 09 7d 0a 58 0a 58 09 |ntinue;.|X.}.X.X.|
|00004f00| 69 66 20 28 21 75 70 64 | 61 74 65 5f 65 78 70 69 |if (!upd|ate_expi|
|00004f10| 72 61 74 69 6f 6e 28 65 | 6e 74 72 79 29 29 20 7b |ration(e|ntry)) {|
|00004f20| 0a 58 09 20 20 20 20 70 | 72 69 6e 74 66 28 22 59 |.X. p|rintf("Y|
|00004f30| 6f 75 20 61 72 65 20 6e | 6f 74 20 61 6c 6c 6f 77 |ou are n|ot allow|
|00004f40| 65 64 20 74 6f 20 63 68 | 61 6e 67 65 20 79 6f 75 |ed to ch|ange you|
|00004f50| 72 20 70 61 73 73 77 6f | 72 64 20 61 6e 64 20 72 |r passwo|rd and r|
|00004f60| 65 76 61 6c 69 64 61 74 | 65 5c 6e 22 29 3b 0a 58 |evalidat|e\n");.X|
|00004f70| 09 20 20 20 20 70 72 69 | 6e 74 66 28 22 79 6f 75 |. pri|ntf("you|
|00004f80| 72 20 61 63 63 6f 75 6e | 74 2e 20 20 50 6c 65 61 |r accoun|t. Plea|
|00004f90| 73 65 20 63 6f 6e 74 61 | 63 74 20 63 69 73 63 6f |se conta|ct cisco|
|00004fa0| 20 45 6e 67 69 6e 65 65 | 72 69 6e 67 20 66 6f 72 | Enginee|ring for|
|00004fb0| 20 61 73 73 69 73 74 61 | 6e 63 65 2e 5c 6e 22 29 | assista|nce.\n")|
|00004fc0| 3b 0a 58 09 20 20 20 20 | 6d 79 5f 65 78 69 74 28 |;.X. |my_exit(|
|00004fd0| 31 29 3b 0a 58 09 7d 0a | 58 0a 58 09 6d 61 6b 65 |1);.X.}.|X.X.make|
|00004fe0| 5f 70 61 73 73 77 64 28 | 65 6e 74 72 79 29 3b 0a |_passwd(|entry);.|
|00004ff0| 58 09 63 6f 70 79 5f 70 | 77 66 69 6c 65 32 28 65 |X.copy_p|wfile2(e|
|00005000| 6e 74 72 79 29 3b 0a 58 | 09 63 6f 70 79 5f 62 61 |ntry);.X|.copy_ba|
|00005010| 63 6b 28 29 3b 0a 58 09 | 77 61 69 74 66 6f 72 75 |ck();.X.|waitforu|
|00005020| 73 65 72 28 29 3b 0a 58 | 09 6d 79 5f 65 78 69 74 |ser();.X|.my_exit|
|00005030| 28 30 29 3b 0a 58 20 20 | 20 20 7d 0a 58 20 20 20 |(0);.X | }.X |
|00005040| 20 6d 79 5f 65 78 69 74 | 28 30 29 3b 0a 58 7d 0a | my_exit|(0);.X}.|
|00005050| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 0a 69 66 20 74 |END_OF_F|ILE.if t|
|00005060| 65 73 74 20 31 37 35 31 | 39 20 2d 6e 65 20 60 77 |est 1751|9 -ne `w|
|00005070| 63 20 2d 63 20 3c 27 78 | 74 61 63 61 63 73 64 2f |c -c <'x|tacacsd/|
|00005080| 63 68 61 6e 67 65 74 61 | 63 2e 63 27 60 3b 20 74 |changeta|c.c'`; t|
|00005090| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|000050a0| 72 3a 20 5c 22 27 78 74 | 61 63 61 63 73 64 2f 63 |r: \"'xt|acacsd/c|
|000050b0| 68 61 6e 67 65 74 61 63 | 2e 63 27 5c 22 20 75 6e |hangetac|.c'\" un|
|000050c0| 70 61 63 6b 65 64 20 77 | 69 74 68 20 77 72 6f 6e |packed w|ith wron|
|000050d0| 67 20 73 69 7a 65 21 0a | 66 69 0a 23 20 65 6e 64 |g size!.|fi.# end|
|000050e0| 20 6f 66 20 27 78 74 61 | 63 61 63 73 64 2f 63 68 | of 'xta|cacsd/ch|
|000050f0| 61 6e 67 65 74 61 63 2e | 63 27 0a 66 69 0a 69 66 |angetac.|c'.fi.if|
|00005100| 20 74 65 73 74 20 21 20 | 2d 64 20 27 78 74 61 63 | test ! |-d 'xtac|
|00005110| 61 63 73 64 2f 69 6e 63 | 6c 75 64 65 27 20 3b 20 |acsd/inc|lude' ; |
|00005120| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 73 68 |then. | echo sh|
|00005130| 61 72 3a 20 43 72 65 61 | 74 69 6e 67 20 64 69 72 |ar: Crea|ting dir|
|00005140| 65 63 74 6f 72 79 20 5c | 22 27 78 74 61 63 61 63 |ectory \|"'xtacac|
|00005150| 73 64 2f 69 6e 63 6c 75 | 64 65 27 5c 22 0a 20 20 |sd/inclu|de'\". |
|00005160| 20 20 6d 6b 64 69 72 20 | 27 78 74 61 63 61 63 73 | mkdir |'xtacacs|
|00005170| 64 2f 69 6e 63 6c 75 64 | 65 27 0a 66 69 0a 69 66 |d/includ|e'.fi.if|
|00005180| 20 74 65 73 74 20 2d 66 | 20 27 78 74 61 63 61 63 | test -f| 'xtacac|
|00005190| 73 64 2f 69 6e 65 74 5f | 6e 74 6f 61 2e 63 27 20 |sd/inet_|ntoa.c' |
|000051a0| 2d 61 20 22 24 7b 31 7d | 22 20 21 3d 20 22 2d 63 |-a "${1}|" != "-c|
|000051b0| 22 20 3b 20 74 68 65 6e | 20 0a 20 20 65 63 68 6f |" ; then| . echo|
|000051c0| 20 73 68 61 72 3a 20 57 | 69 6c 6c 20 6e 6f 74 20 | shar: W|ill not |
|000051d0| 63 6c 6f 62 62 65 72 20 | 65 78 69 73 74 69 6e 67 |clobber |existing|
|000051e0| 20 66 69 6c 65 20 5c 22 | 27 78 74 61 63 61 63 73 | file \"|'xtacacs|
|000051f0| 64 2f 69 6e 65 74 5f 6e | 74 6f 61 2e 63 27 5c 22 |d/inet_n|toa.c'\"|
|00005200| 0a 65 6c 73 65 0a 65 63 | 68 6f 20 73 68 61 72 3a |.else.ec|ho shar:|
|00005210| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 27 78 | Extract|ing \"'x|
|00005220| 74 61 63 61 63 73 64 2f | 69 6e 65 74 5f 6e 74 6f |tacacsd/|inet_nto|
|00005230| 61 2e 63 27 5c 22 20 5c | 28 31 34 39 37 20 63 68 |a.c'\" \|(1497 ch|
|00005240| 61 72 61 63 74 65 72 73 | 5c 29 0a 73 65 64 20 22 |aracters|\).sed "|
|00005250| 73 2f 5e 58 2f 2f 22 20 | 3e 27 78 74 61 63 61 63 |s/^X//" |>'xtacac|
|00005260| 73 64 2f 69 6e 65 74 5f | 6e 74 6f 61 2e 63 27 20 |sd/inet_|ntoa.c' |
|00005270| 3c 3c 27 45 4e 44 5f 4f | 46 5f 46 49 4c 45 27 0a |<<'END_O|F_FILE'.|
|00005280| 58 2f 2a 0a 58 20 2a 20 | 43 6f 70 79 72 69 67 68 |X/*.X * |Copyrigh|
|00005290| 74 20 28 63 29 20 31 39 | 38 33 20 52 65 67 65 6e |t (c) 19|83 Regen|
|000052a0| 74 73 20 6f 66 20 74 68 | 65 20 55 6e 69 76 65 72 |ts of th|e Univer|
|000052b0| 73 69 74 79 20 6f 66 20 | 43 61 6c 69 66 6f 72 6e |sity of |Californ|
|000052c0| 69 61 2e 0a 58 20 2a 20 | 41 6c 6c 20 72 69 67 68 |ia..X * |All righ|
|000052d0| 74 73 20 72 65 73 65 72 | 76 65 64 2e 0a 58 20 2a |ts reser|ved..X *|
|000052e0| 0a 58 20 2a 20 52 65 64 | 69 73 74 72 69 62 75 74 |.X * Red|istribut|
|000052f0| 69 6f 6e 20 61 6e 64 20 | 75 73 65 20 69 6e 20 73 |ion and |use in s|
|00005300| 6f 75 72 63 65 20 61 6e | 64 20 62 69 6e 61 72 79 |ource an|d binary|
|00005310| 20 66 6f 72 6d 73 20 61 | 72 65 20 70 65 72 6d 69 | forms a|re permi|
|00005320| 74 74 65 64 0a 58 20 2a | 20 70 72 6f 76 69 64 65 |tted.X *| provide|
|00005330| 64 20 74 68 61 74 3a 20 | 28 31 29 20 73 6f 75 72 |d that: |(1) sour|
|00005340| 63 65 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 73 |ce distr|ibutions|
|00005350| 20 72 65 74 61 69 6e 20 | 74 68 69 73 20 65 6e 74 | retain |this ent|
|00005360| 69 72 65 20 63 6f 70 79 | 72 69 67 68 74 0a 58 20 |ire copy|right.X |
|00005370| 2a 20 6e 6f 74 69 63 65 | 20 61 6e 64 20 63 6f 6d |* notice| and com|
|00005380| 6d 65 6e 74 2c 20 61 6e | 64 20 28 32 29 20 64 69 |ment, an|d (2) di|
|00005390| 73 74 72 69 62 75 74 69 | 6f 6e 73 20 69 6e 63 6c |stributi|ons incl|
|000053a0| 75 64 69 6e 67 20 62 69 | 6e 61 72 69 65 73 20 64 |uding bi|naries d|
|000053b0| 69 73 70 6c 61 79 0a 58 | 20 2a 20 74 68 65 20 66 |isplay.X| * the f|
|000053c0| 6f 6c 6c 6f 77 69 6e 67 | 20 61 63 6b 6e 6f 77 6c |ollowing| acknowl|
|000053d0| 65 64 67 65 6d 65 6e 74 | 3a 20 20 60 60 54 68 69 |edgement|: ``Thi|
|000053e0| 73 20 70 72 6f 64 75 63 | 74 20 69 6e 63 6c 75 64 |s produc|t includ|
|000053f0| 65 73 20 73 6f 66 74 77 | 61 72 65 0a 58 20 2a 20 |es softw|are.X * |
|00005400| 64 65 76 65 6c 6f 70 65 | 64 20 62 79 20 74 68 65 |develope|d by the|
|00005410| 20 55 6e 69 76 65 72 73 | 69 74 79 20 6f 66 20 43 | Univers|ity of C|
|00005420| 61 6c 69 66 6f 72 6e 69 | 61 2c 20 42 65 72 6b 65 |aliforni|a, Berke|
|00005430| 6c 65 79 20 61 6e 64 20 | 69 74 73 20 63 6f 6e 74 |ley and |its cont|
|00005440| 72 69 62 75 74 6f 72 73 | 27 27 0a 58 20 2a 20 69 |ributors|''.X * i|
|00005450| 6e 20 74 68 65 20 64 6f | 63 75 6d 65 6e 74 61 74 |n the do|cumentat|
|00005460| 69 6f 6e 20 6f 72 20 6f | 74 68 65 72 20 6d 61 74 |ion or o|ther mat|
|00005470| 65 72 69 61 6c 73 20 70 | 72 6f 76 69 64 65 64 20 |erials p|rovided |
|00005480| 77 69 74 68 20 74 68 65 | 20 64 69 73 74 72 69 62 |with the| distrib|
|00005490| 75 74 69 6f 6e 0a 58 20 | 2a 20 61 6e 64 20 69 6e |ution.X |* and in|
|000054a0| 20 61 6c 6c 20 61 64 76 | 65 72 74 69 73 69 6e 67 | all adv|ertising|
|000054b0| 20 6d 61 74 65 72 69 61 | 6c 73 20 6d 65 6e 74 69 | materia|ls menti|
|000054c0| 6f 6e 69 6e 67 20 66 65 | 61 74 75 72 65 73 20 6f |oning fe|atures o|
|000054d0| 72 20 75 73 65 20 6f 66 | 20 74 68 69 73 0a 58 20 |r use of| this.X |
|000054e0| 2a 20 73 6f 66 74 77 61 | 72 65 2e 20 4e 65 69 74 |* softwa|re. Neit|
|000054f0| 68 65 72 20 74 68 65 20 | 6e 61 6d 65 20 6f 66 20 |her the |name of |
|00005500| 74 68 65 20 55 6e 69 76 | 65 72 73 69 74 79 20 6e |the Univ|ersity n|
|00005510| 6f 72 20 74 68 65 20 6e | 61 6d 65 73 20 6f 66 20 |or the n|ames of |
|00005520| 69 74 73 0a 58 20 2a 20 | 63 6f 6e 74 72 69 62 75 |its.X * |contribu|
|00005530| 74 6f 72 73 20 6d 61 79 | 20 62 65 20 75 73 65 64 |tors may| be used|
|00005540| 20 74 6f 20 65 6e 64 6f | 72 73 65 20 6f 72 20 70 | to endo|rse or p|
|00005550| 72 6f 6d 6f 74 65 20 70 | 72 6f 64 75 63 74 73 20 |romote p|roducts |
|00005560| 64 65 72 69 76 65 64 0a | 58 20 2a 20 66 72 6f 6d |derived.|X * from|
|00005570| 20 74 68 69 73 20 73 6f | 66 74 77 61 72 65 20 77 | this so|ftware w|
|00005580| 69 74 68 6f 75 74 20 73 | 70 65 63 69 66 69 63 20 |ithout s|pecific |
|00005590| 70 72 69 6f 72 20 77 72 | 69 74 74 65 6e 20 70 65 |prior wr|itten pe|
|000055a0| 72 6d 69 73 73 69 6f 6e | 2e 0a 58 20 2a 20 54 48 |rmission|..X * TH|
|000055b0| 49 53 20 53 4f 46 54 57 | 41 52 45 20 49 53 20 50 |IS SOFTW|ARE IS P|
|000055c0| 52 4f 56 49 44 45 44 20 | 60 60 41 53 20 49 53 27 |ROVIDED |``AS IS'|
|000055d0| 27 20 41 4e 44 20 57 49 | 54 48 4f 55 54 20 41 4e |' AND WI|THOUT AN|
|000055e0| 59 20 45 58 50 52 45 53 | 53 20 4f 52 0a 58 20 2a |Y EXPRES|S OR.X *|
|000055f0| 20 49 4d 50 4c 49 45 44 | 20 57 41 52 52 41 4e 54 | IMPLIED| WARRANT|
|00005600| 49 45 53 2c 20 49 4e 43 | 4c 55 44 49 4e 47 2c 20 |IES, INC|LUDING, |
|00005610| 57 49 54 48 4f 55 54 20 | 4c 49 4d 49 54 41 54 49 |WITHOUT |LIMITATI|
|00005620| 4f 4e 2c 20 54 48 45 20 | 49 4d 50 4c 49 45 44 0a |ON, THE |IMPLIED.|
|00005630| 58 20 2a 20 57 41 52 52 | 41 4e 54 49 45 53 20 4f |X * WARR|ANTIES O|
|00005640| 46 20 4d 45 52 43 48 41 | 4e 54 41 42 49 4c 49 54 |F MERCHA|NTABILIT|
|00005650| 59 20 41 4e 44 20 46 49 | 54 4e 45 53 53 20 46 4f |Y AND FI|TNESS FO|
|00005660| 52 20 41 20 50 41 52 54 | 49 43 55 4c 41 52 20 50 |R A PART|ICULAR P|
|00005670| 55 52 50 4f 53 45 2e 0a | 58 20 2a 2f 0a 58 0a 58 |URPOSE..|X */.X.X|
|00005680| 23 69 66 20 64 65 66 69 | 6e 65 64 28 4c 49 42 43 |#if defi|ned(LIBC|
|00005690| 5f 53 43 43 53 29 20 26 | 26 20 21 64 65 66 69 6e |_SCCS) &|& !defin|
|000056a0| 65 64 28 6c 69 6e 74 29 | 0a 58 73 74 61 74 69 63 |ed(lint)|.Xstatic|
|000056b0| 20 63 68 61 72 20 73 63 | 63 73 69 64 5b 5d 20 3d | char sc|csid[] =|
|000056c0| 20 22 40 28 23 29 69 6e | 65 74 5f 6e 74 6f 61 2e | "@(#)in|et_ntoa.|
|000056d0| 63 09 35 2e 35 20 28 42 | 65 72 6b 65 6c 65 79 29 |c.5.5 (B|erkeley)|
|000056e0| 20 36 2f 31 2f 39 30 22 | 3b 0a 58 23 65 6e 64 69 | 6/1/90"|;.X#endi|
|000056f0| 66 20 2f 2a 20 4c 49 42 | 43 5f 53 43 43 53 20 61 |f /* LIB|C_SCCS a|
|00005700| 6e 64 20 6e 6f 74 20 6c | 69 6e 74 20 2a 2f 0a 58 |nd not l|int */.X|
|00005710| 0a 58 2f 2a 0a 58 20 2a | 20 43 6f 6e 76 65 72 74 |.X/*.X *| Convert|
|00005720| 20 6e 65 74 77 6f 72 6b | 2d 66 6f 72 6d 61 74 20 | network|-format |
|00005730| 69 6e 74 65 72 6e 65 74 | 20 61 64 64 72 65 73 73 |internet| address|
|00005740| 0a 58 20 2a 20 74 6f 20 | 62 61 73 65 20 32 35 36 |.X * to |base 256|
|00005750| 20 64 2e 64 2e 64 2e 64 | 20 72 65 70 72 65 73 65 | d.d.d.d| represe|
|00005760| 6e 74 61 74 69 6f 6e 2e | 0a 58 20 2a 2f 0a 58 23 |ntation.|.X */.X#|
|00005770| 69 6e 63 6c 75 64 65 20 | 3c 73 79 73 2f 74 79 70 |include |<sys/typ|
|00005780| 65 73 2e 68 3e 0a 58 23 | 69 6e 63 6c 75 64 65 20 |es.h>.X#|include |
|00005790| 3c 6e 65 74 69 6e 65 74 | 2f 69 6e 2e 68 3e 0a 58 |<netinet|/in.h>.X|
|000057a0| 0a 58 63 68 61 72 20 2a | 0a 58 69 6e 65 74 5f 6e |.Xchar *|.Xinet_n|
|000057b0| 74 6f 61 28 69 6e 29 0a | 58 09 73 74 72 75 63 74 |toa(in).|X.struct|
|000057c0| 20 69 6e 5f 61 64 64 72 | 20 69 6e 3b 0a 58 7b 0a | in_addr| in;.X{.|
|000057d0| 58 09 73 74 61 74 69 63 | 20 63 68 61 72 20 62 5b |X.static| char b[|
|000057e0| 31 38 5d 3b 0a 58 09 72 | 65 67 69 73 74 65 72 20 |18];.X.r|egister |
|000057f0| 63 68 61 72 20 2a 70 3b | 0a 58 0a 58 09 70 20 3d |char *p;|.X.X.p =|
|00005800| 20 28 63 68 61 72 20 2a | 29 26 69 6e 3b 0a 58 23 | (char *|)&in;.X#|
|00005810| 64 65 66 69 6e 65 09 55 | 43 28 62 29 09 28 28 28 |define.U|C(b).(((|
|00005820| 69 6e 74 29 62 29 26 30 | 78 66 66 29 0a 58 09 73 |int)b)&0|xff).X.s|
|00005830| 70 72 69 6e 74 66 28 62 | 2c 20 22 25 64 2e 25 64 |printf(b|, "%d.%d|
|00005840| 2e 25 64 2e 25 64 22 2c | 20 55 43 28 70 5b 30 5d |.%d.%d",| UC(p[0]|
|00005850| 29 2c 20 55 43 28 70 5b | 31 5d 29 2c 20 55 43 28 |), UC(p[|1]), UC(|
|00005860| 70 5b 32 5d 29 2c 20 55 | 43 28 70 5b 33 5d 29 29 |p[2]), U|C(p[3]))|
|00005870| 3b 0a 58 09 72 65 74 75 | 72 6e 20 28 62 29 3b 0a |;.X.retu|rn (b);.|
|00005880| 58 7d 0a 45 4e 44 5f 4f | 46 5f 46 49 4c 45 0a 69 |X}.END_O|F_FILE.i|
|00005890| 66 20 74 65 73 74 20 31 | 34 39 37 20 2d 6e 65 20 |f test 1|497 -ne |
|000058a0| 60 77 63 20 2d 63 20 3c | 27 78 74 61 63 61 63 73 |`wc -c <|'xtacacs|
|000058b0| 64 2f 69 6e 65 74 5f 6e | 74 6f 61 2e 63 27 60 3b |d/inet_n|toa.c'`;|
|000058c0| 20 74 68 65 6e 0a 20 20 | 20 20 65 63 68 6f 20 73 | then. | echo s|
|000058d0| 68 61 72 3a 20 5c 22 27 | 78 74 61 63 61 63 73 64 |har: \"'|xtacacsd|
|000058e0| 2f 69 6e 65 74 5f 6e 74 | 6f 61 2e 63 27 5c 22 20 |/inet_nt|oa.c'\" |
|000058f0| 75 6e 70 61 63 6b 65 64 | 20 77 69 74 68 20 77 72 |unpacked| with wr|
|00005900| 6f 6e 67 20 73 69 7a 65 | 21 0a 66 69 0a 23 20 65 |ong size|!.fi.# e|
|00005910| 6e 64 20 6f 66 20 27 78 | 74 61 63 61 63 73 64 2f |nd of 'x|tacacsd/|
|00005920| 69 6e 65 74 5f 6e 74 6f | 61 2e 63 27 0a 66 69 0a |inet_nto|a.c'.fi.|
|00005930| 69 66 20 74 65 73 74 20 | 2d 66 20 27 78 74 61 63 |if test |-f 'xtac|
|00005940| 61 63 73 64 2f 73 74 72 | 65 72 72 6f 72 2e 63 27 |acsd/str|error.c'|
|00005950| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|00005960| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|00005970| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|00005980| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|00005990| 67 20 66 69 6c 65 20 5c | 22 27 78 74 61 63 61 63 |g file \|"'xtacac|
|000059a0| 73 64 2f 73 74 72 65 72 | 72 6f 72 2e 63 27 5c 22 |sd/strer|ror.c'\"|
|000059b0| 0a 65 6c 73 65 0a 65 63 | 68 6f 20 73 68 61 72 3a |.else.ec|ho shar:|
|000059c0| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 27 78 | Extract|ing \"'x|
|000059d0| 74 61 63 61 63 73 64 2f | 73 74 72 65 72 72 6f 72 |tacacsd/|strerror|
|000059e0| 2e 63 27 5c 22 20 5c 28 | 31 34 34 36 20 63 68 61 |.c'\" \(|1446 cha|
|000059f0| 72 61 63 74 65 72 73 5c | 29 0a 73 65 64 20 22 73 |racters\|).sed "s|
|00005a00| 2f 5e 58 2f 2f 22 20 3e | 27 78 74 61 63 61 63 73 |/^X//" >|'xtacacs|
|00005a10| 64 2f 73 74 72 65 72 72 | 6f 72 2e 63 27 20 3c 3c |d/strerr|or.c' <<|
|00005a20| 27 45 4e 44 5f 4f 46 5f | 46 49 4c 45 27 0a 58 2f |'END_OF_|FILE'.X/|
|00005a30| 2a 0a 58 20 2a 20 43 6f | 70 79 72 69 67 68 74 20 |*.X * Co|pyright |
|00005a40| 28 63 29 20 31 39 38 38 | 20 52 65 67 65 6e 74 73 |(c) 1988| Regents|
|00005a50| 20 6f 66 20 74 68 65 20 | 55 6e 69 76 65 72 73 69 | of the |Universi|
|00005a60| 74 79 20 6f 66 20 43 61 | 6c 69 66 6f 72 6e 69 61 |ty of Ca|lifornia|
|00005a70| 2e 0a 58 20 2a 20 41 6c | 6c 20 72 69 67 68 74 73 |..X * Al|l rights|
|00005a80| 20 72 65 73 65 72 76 65 | 64 2e 0a 58 20 2a 0a 58 | reserve|d..X *.X|
|00005a90| 20 2a 20 52 65 64 69 73 | 74 72 69 62 75 74 69 6f | * Redis|tributio|
|00005aa0| 6e 20 61 6e 64 20 75 73 | 65 20 69 6e 20 73 6f 75 |n and us|e in sou|
|00005ab0| 72 63 65 20 61 6e 64 20 | 62 69 6e 61 72 79 20 66 |rce and |binary f|
|00005ac0| 6f 72 6d 73 20 61 72 65 | 20 70 65 72 6d 69 74 74 |orms are| permitt|
|00005ad0| 65 64 20 70 72 6f 76 69 | 64 65 64 0a 58 20 2a 20 |ed provi|ded.X * |
|00005ae0| 74 68 61 74 3a 20 28 31 | 29 20 73 6f 75 72 63 65 |that: (1|) source|
|00005af0| 20 64 69 73 74 72 69 62 | 75 74 69 6f 6e 73 20 72 | distrib|utions r|
|00005b00| 65 74 61 69 6e 20 74 68 | 69 73 20 65 6e 74 69 72 |etain th|is entir|
|00005b10| 65 20 63 6f 70 79 72 69 | 67 68 74 20 6e 6f 74 69 |e copyri|ght noti|
|00005b20| 63 65 20 61 6e 64 0a 58 | 20 2a 20 63 6f 6d 6d 65 |ce and.X| * comme|
|00005b30| 6e 74 2c 20 61 6e 64 20 | 28 32 29 20 64 69 73 74 |nt, and |(2) dist|
|00005b40| 72 69 62 75 74 69 6f 6e | 73 20 69 6e 63 6c 75 64 |ribution|s includ|
|00005b50| 69 6e 67 20 62 69 6e 61 | 72 69 65 73 20 64 69 73 |ing bina|ries dis|
|00005b60| 70 6c 61 79 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |play the| followi|
|00005b70| 6e 67 0a 58 20 2a 20 61 | 63 6b 6e 6f 77 6c 65 64 |ng.X * a|cknowled|
|00005b80| 67 65 6d 65 6e 74 3a 20 | 20 60 60 54 68 69 73 20 |gement: | ``This |
|00005b90| 70 72 6f 64 75 63 74 20 | 69 6e 63 6c 75 64 65 73 |product |includes|
|00005ba0| 20 73 6f 66 74 77 61 72 | 65 20 64 65 76 65 6c 6f | softwar|e develo|
|00005bb0| 70 65 64 20 62 79 20 74 | 68 65 0a 58 20 2a 20 55 |ped by t|he.X * U|
|00005bc0| 6e 69 76 65 72 73 69 74 | 79 20 6f 66 20 43 61 6c |niversit|y of Cal|
|00005bd0| 69 66 6f 72 6e 69 61 2c | 20 42 65 72 6b 65 6c 65 |ifornia,| Berkele|
|00005be0| 79 20 61 6e 64 20 69 74 | 73 20 63 6f 6e 74 72 69 |y and it|s contri|
|00005bf0| 62 75 74 6f 72 73 27 27 | 20 69 6e 20 74 68 65 0a |butors''| in the.|
|00005c00| 58 20 2a 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |X * docu|mentatio|
|00005c10| 6e 20 6f 72 20 6f 74 68 | 65 72 20 6d 61 74 65 72 |n or oth|er mater|
|00005c20| 69 61 6c 73 20 70 72 6f | 76 69 64 65 64 20 77 69 |ials pro|vided wi|
|00005c30| 74 68 20 74 68 65 20 64 | 69 73 74 72 69 62 75 74 |th the d|istribut|
|00005c40| 69 6f 6e 20 61 6e 64 20 | 69 6e 0a 58 20 2a 20 61 |ion and |in.X * a|
|00005c50| 6c 6c 20 61 64 76 65 72 | 74 69 73 69 6e 67 20 6d |ll adver|tising m|
|00005c60| 61 74 65 72 69 61 6c 73 | 20 6d 65 6e 74 69 6f 6e |aterials| mention|
|00005c70| 69 6e 67 20 66 65 61 74 | 75 72 65 73 20 6f 72 20 |ing feat|ures or |
|00005c80| 75 73 65 20 6f 66 20 74 | 68 69 73 20 73 6f 66 74 |use of t|his soft|
|00005c90| 77 61 72 65 2e 0a 58 20 | 2a 20 4e 65 69 74 68 65 |ware..X |* Neithe|
|00005ca0| 72 20 74 68 65 20 6e 61 | 6d 65 20 6f 66 20 74 68 |r the na|me of th|
|00005cb0| 65 20 55 6e 69 76 65 72 | 73 69 74 79 20 6e 6f 72 |e Univer|sity nor|
|00005cc0| 20 74 68 65 20 6e 61 6d | 65 73 20 6f 66 20 69 74 | the nam|es of it|
|00005cd0| 73 20 63 6f 6e 74 72 69 | 62 75 74 6f 72 73 20 6d |s contri|butors m|
|00005ce0| 61 79 0a 58 20 2a 20 62 | 65 20 75 73 65 64 20 74 |ay.X * b|e used t|
|00005cf0| 6f 20 65 6e 64 6f 72 73 | 65 20 6f 72 20 70 72 6f |o endors|e or pro|
|00005d00| 6d 6f 74 65 20 70 72 6f | 64 75 63 74 73 20 64 65 |mote pro|ducts de|
|00005d10| 72 69 76 65 64 20 66 72 | 6f 6d 20 74 68 69 73 20 |rived fr|om this |
|00005d20| 73 6f 66 74 77 61 72 65 | 20 77 69 74 68 6f 75 74 |software| without|
|00005d30| 0a 58 20 2a 20 73 70 65 | 63 69 66 69 63 20 70 72 |.X * spe|cific pr|
|00005d40| 69 6f 72 20 77 72 69 74 | 74 65 6e 20 70 65 72 6d |ior writ|ten perm|
|00005d50| 69 73 73 69 6f 6e 2e 0a | 58 20 2a 20 54 48 49 53 |ission..|X * THIS|
|00005d60| 20 53 4f 46 54 57 41 52 | 45 20 49 53 20 50 52 4f | SOFTWAR|E IS PRO|
|00005d70| 56 49 44 45 44 20 60 60 | 41 53 20 49 53 27 27 20 |VIDED ``|AS IS'' |
|00005d80| 41 4e 44 20 57 49 54 48 | 4f 55 54 20 41 4e 59 20 |AND WITH|OUT ANY |
|00005d90| 45 58 50 52 45 53 53 20 | 4f 52 20 49 4d 50 4c 49 |EXPRESS |OR IMPLI|
|00005da0| 45 44 0a 58 20 2a 20 57 | 41 52 52 41 4e 54 49 45 |ED.X * W|ARRANTIE|
|00005db0| 53 2c 20 49 4e 43 4c 55 | 44 49 4e 47 2c 20 57 49 |S, INCLU|DING, WI|
|00005dc0| 54 48 4f 55 54 20 4c 49 | 4d 49 54 41 54 49 4f 4e |THOUT LI|MITATION|
|00005dd0| 2c 20 54 48 45 20 49 4d | 50 4c 49 45 44 20 57 41 |, THE IM|PLIED WA|
|00005de0| 52 52 41 4e 54 49 45 53 | 20 4f 46 0a 58 20 2a 20 |RRANTIES| OF.X * |
|00005df0| 4d 45 52 43 48 41 4e 54 | 41 42 49 4c 49 54 59 20 |MERCHANT|ABILITY |
|00005e00| 41 4e 44 20 46 49 54 4e | 45 53 53 20 46 4f 52 20 |AND FITN|ESS FOR |
|00005e10| 41 20 50 41 52 54 49 43 | 55 4c 41 52 20 50 55 52 |A PARTIC|ULAR PUR|
|00005e20| 50 4f 53 45 2e 0a 58 20 | 2a 2f 0a 58 0a 58 23 69 |POSE..X |*/.X.X#i|
|00005e30| 66 20 64 65 66 69 6e 65 | 64 28 4c 49 42 43 5f 53 |f define|d(LIBC_S|
|00005e40| 43 43 53 29 20 26 26 20 | 21 64 65 66 69 6e 65 64 |CCS) && |!defined|
|00005e50| 28 6c 69 6e 74 29 0a 58 | 73 74 61 74 69 63 20 63 |(lint).X|static c|
|00005e60| 68 61 72 20 73 63 63 73 | 69 64 5b 5d 20 3d 20 22 |har sccs|id[] = "|
|00005e70| 40 28 23 29 73 74 72 65 | 72 72 6f 72 2e 63 09 35 |@(#)stre|rror.c.5|
|00005e80| 2e 34 20 28 42 65 72 6b | 65 6c 65 79 29 20 36 2f |.4 (Berk|eley) 6/|
|00005e90| 32 34 2f 39 30 22 3b 0a | 58 23 65 6e 64 69 66 20 |24/90";.|X#endif |
|00005ea0| 2f 2a 20 4c 49 42 43 5f | 53 43 43 53 20 61 6e 64 |/* LIBC_|SCCS and|
|00005eb0| 20 6e 6f 74 20 6c 69 6e | 74 20 2a 2f 0a 58 0a 58 | not lin|t */.X.X|
|00005ec0| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 72 69 6e 67 |#include| <string|
|00005ed0| 2e 68 3e 0a 58 0a 58 63 | 68 61 72 20 2a 0a 58 73 |.h>.X.Xc|har *.Xs|
|00005ee0| 74 72 65 72 72 6f 72 28 | 65 72 72 6e 75 6d 29 0a |trerror(|errnum).|
|00005ef0| 58 09 69 6e 74 20 65 72 | 72 6e 75 6d 3b 0a 58 7b |X.int er|rnum;.X{|
|00005f00| 0a 58 09 65 78 74 65 72 | 6e 20 69 6e 74 20 73 79 |.X.exter|n int sy|
|00005f10| 73 5f 6e 65 72 72 3b 0a | 58 09 65 78 74 65 72 6e |s_nerr;.|X.extern|
|00005f20| 20 63 68 61 72 20 2a 73 | 79 73 5f 65 72 72 6c 69 | char *s|ys_errli|
|00005f30| 73 74 5b 5d 3b 0a 58 09 | 73 74 61 74 69 63 20 63 |st[];.X.|static c|
|00005f40| 68 61 72 20 65 62 75 66 | 5b 34 30 5d 3b 09 09 2f |har ebuf|[40];../|
|00005f50| 2a 20 36 34 2d 62 69 74 | 20 6e 75 6d 62 65 72 20 |* 64-bit| number |
|00005f60| 2b 20 73 6c 6f 70 20 2a | 2f 0a 58 0a 58 09 69 66 |+ slop *|/.X.X.if|
|00005f70| 20 28 28 75 6e 73 69 67 | 6e 65 64 20 69 6e 74 29 | ((unsig|ned int)|
|00005f80| 65 72 72 6e 75 6d 20 3c | 20 73 79 73 5f 6e 65 72 |errnum <| sys_ner|
|00005f90| 72 29 0a 58 09 09 72 65 | 74 75 72 6e 28 73 79 73 |r).X..re|turn(sys|
|00005fa0| 5f 65 72 72 6c 69 73 74 | 5b 65 72 72 6e 75 6d 5d |_errlist|[errnum]|
|00005fb0| 29 3b 0a 58 09 28 76 6f | 69 64 29 73 70 72 69 6e |);.X.(vo|id)sprin|
|00005fc0| 74 66 28 65 62 75 66 2c | 20 22 55 6e 6b 6e 6f 77 |tf(ebuf,| "Unknow|
|00005fd0| 6e 20 65 72 72 6f 72 3a | 20 25 64 22 2c 20 65 72 |n error:| %d", er|
|00005fe0| 72 6e 75 6d 29 3b 0a 58 | 09 72 65 74 75 72 6e 28 |rnum);.X|.return(|
|00005ff0| 65 62 75 66 29 3b 0a 58 | 7d 0a 45 4e 44 5f 4f 46 |ebuf);.X|}.END_OF|
|00006000| 5f 46 49 4c 45 0a 69 66 | 20 74 65 73 74 20 31 34 |_FILE.if| test 14|
|00006010| 34 36 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |46 -ne `|wc -c <'|
|00006020| 78 74 61 63 61 63 73 64 | 2f 73 74 72 65 72 72 6f |xtacacsd|/strerro|
|00006030| 72 2e 63 27 60 3b 20 74 | 68 65 6e 0a 20 20 20 20 |r.c'`; t|hen. |
|00006040| 65 63 68 6f 20 73 68 61 | 72 3a 20 5c 22 27 78 74 |echo sha|r: \"'xt|
|00006050| 61 63 61 63 73 64 2f 73 | 74 72 65 72 72 6f 72 2e |acacsd/s|trerror.|
|00006060| 63 27 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |c'\" unp|acked wi|
|00006070| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 66 |th wrong| size!.f|
|00006080| 69 0a 23 20 65 6e 64 20 | 6f 66 20 27 78 74 61 63 |i.# end |of 'xtac|
|00006090| 61 63 73 64 2f 73 74 72 | 65 72 72 6f 72 2e 63 27 |acsd/str|error.c'|
|000060a0| 0a 66 69 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |.fi.if t|est -f '|
|000060b0| 78 74 61 63 61 63 73 64 | 2f 73 79 73 6c 6f 67 2e |xtacacsd|/syslog.|
|000060c0| 33 27 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |3' -a "$|{1}" != |
|000060d0| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|000060e0| 63 68 6f 20 73 68 61 72 | 3a 20 57 69 6c 6c 20 6e |cho shar|: Will n|
|000060f0| 6f 74 20 63 6c 6f 62 62 | 65 72 20 65 78 69 73 74 |ot clobb|er exist|
|00006100| 69 6e 67 20 66 69 6c 65 | 20 5c 22 27 78 74 61 63 |ing file| \"'xtac|
|00006110| 61 63 73 64 2f 73 79 73 | 6c 6f 67 2e 33 27 5c 22 |acsd/sys|log.3'\"|
|00006120| 0a 65 6c 73 65 0a 65 63 | 68 6f 20 73 68 61 72 3a |.else.ec|ho shar:|
|00006130| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 27 78 | Extract|ing \"'x|
|00006140| 74 61 63 61 63 73 64 2f | 73 79 73 6c 6f 67 2e 33 |tacacsd/|syslog.3|
|00006150| 27 5c 22 20 5c 28 35 34 | 37 34 20 63 68 61 72 61 |'\" \(54|74 chara|
|00006160| 63 74 65 72 73 5c 29 0a | 73 65 64 20 22 73 2f 5e |cters\).|sed "s/^|
|00006170| 58 2f 2f 22 20 3e 27 78 | 74 61 63 61 63 73 64 2f |X//" >'x|tacacsd/|
|00006180| 73 79 73 6c 6f 67 2e 33 | 27 20 3c 3c 27 45 4e 44 |syslog.3|' <<'END|
|00006190| 5f 4f 46 5f 46 49 4c 45 | 27 0a 58 2e 5c 22 20 43 |_OF_FILE|'.X.\" C|
|000061a0| 6f 70 79 72 69 67 68 74 | 20 28 63 29 20 31 39 38 |opyright| (c) 198|
|000061b0| 35 20 54 68 65 20 52 65 | 67 65 6e 74 73 20 6f 66 |5 The Re|gents of|
|000061c0| 20 74 68 65 20 55 6e 69 | 76 65 72 73 69 74 79 20 | the Uni|versity |
|000061d0| 6f 66 20 43 61 6c 69 66 | 6f 72 6e 69 61 2e 0a 58 |of Calif|ornia..X|
|000061e0| 2e 5c 22 20 41 6c 6c 20 | 72 69 67 68 74 73 20 72 |.\" All |rights r|
|000061f0| 65 73 65 72 76 65 64 2e | 0a 58 2e 5c 22 0a 58 2e |eserved.|.X.\".X.|
|00006200| 5c 22 20 52 65 64 69 73 | 74 72 69 62 75 74 69 6f |\" Redis|tributio|
|00006210| 6e 20 61 6e 64 20 75 73 | 65 20 69 6e 20 73 6f 75 |n and us|e in sou|
|00006220| 72 63 65 20 61 6e 64 20 | 62 69 6e 61 72 79 20 66 |rce and |binary f|
|00006230| 6f 72 6d 73 20 61 72 65 | 20 70 65 72 6d 69 74 74 |orms are| permitt|
|00006240| 65 64 20 70 72 6f 76 69 | 64 65 64 0a 58 2e 5c 22 |ed provi|ded.X.\"|
|00006250| 20 74 68 61 74 3a 20 28 | 31 29 20 73 6f 75 72 63 | that: (|1) sourc|
|00006260| 65 20 64 69 73 74 72 69 | 62 75 74 69 6f 6e 73 20 |e distri|butions |
|00006270| 72 65 74 61 69 6e 20 74 | 68 69 73 20 65 6e 74 69 |retain t|his enti|
|00006280| 72 65 20 63 6f 70 79 72 | 69 67 68 74 20 6e 6f 74 |re copyr|ight not|
|00006290| 69 63 65 20 61 6e 64 0a | 58 2e 5c 22 20 63 6f 6d |ice and.|X.\" com|
|000062a0| 6d 65 6e 74 2c 20 61 6e | 64 20 28 32 29 20 64 69 |ment, an|d (2) di|
|000062b0| 73 74 72 69 62 75 74 69 | 6f 6e 73 20 69 6e 63 6c |stributi|ons incl|
|000062c0| 75 64 69 6e 67 20 62 69 | 6e 61 72 69 65 73 20 64 |uding bi|naries d|
|000062d0| 69 73 70 6c 61 79 20 74 | 68 65 20 66 6f 6c 6c 6f |isplay t|he follo|
|000062e0| 77 69 6e 67 0a 58 2e 5c | 22 20 61 63 6b 6e 6f 77 |wing.X.\|" acknow|
|000062f0| 6c 65 64 67 65 6d 65 6e | 74 3a 20 20 60 60 54 68 |ledgemen|t: ``Th|
|00006300| 69 73 20 70 72 6f 64 75 | 63 74 20 69 6e 63 6c 75 |is produ|ct inclu|
|00006310| 64 65 73 20 73 6f 66 74 | 77 61 72 65 20 64 65 76 |des soft|ware dev|
|00006320| 65 6c 6f 70 65 64 20 62 | 79 20 74 68 65 0a 58 2e |eloped b|y the.X.|
|00006330| 5c 22 20 55 6e 69 76 65 | 72 73 69 74 79 20 6f 66 |\" Unive|rsity of|
|00006340| 20 43 61 6c 69 66 6f 72 | 6e 69 61 2c 20 42 65 72 | Califor|nia, Ber|
|00006350| 6b 65 6c 65 79 20 61 6e | 64 20 69 74 73 20 63 6f |keley an|d its co|
|00006360| 6e 74 72 69 62 75 74 6f | 72 73 27 27 20 69 6e 20 |ntributo|rs'' in |
|00006370| 74 68 65 0a 58 2e 5c 22 | 20 64 6f 63 75 6d 65 6e |the.X.\"| documen|
|00006380| 74 61 74 69 6f 6e 20 6f | 72 20 6f 74 68 65 72 20 |tation o|r other |
|00006390| 6d 61 74 65 72 69 61 6c | 73 20 70 72 6f 76 69 64 |material|s provid|
|000063a0| 65 64 20 77 69 74 68 20 | 74 68 65 20 64 69 73 74 |ed with |the dist|
|000063b0| 72 69 62 75 74 69 6f 6e | 20 61 6e 64 20 69 6e 0a |ribution| and in.|
|000063c0| 58 2e 5c 22 20 61 6c 6c | 20 61 64 76 65 72 74 69 |X.\" all| adverti|
|000063d0| 73 69 6e 67 20 6d 61 74 | 65 72 69 61 6c 73 20 6d |sing mat|erials m|
|000063e0| 65 6e 74 69 6f 6e 69 6e | 67 20 66 65 61 74 75 72 |entionin|g featur|
|000063f0| 65 73 20 6f 72 20 75 73 | 65 20 6f 66 20 74 68 69 |es or us|e of thi|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.